# Performance Improvements on the Contacts Page | Detail View

**URL:** <https://forum.communityhealthtoolkit.org/t/performance-improvements-on-the-contacts-page-detail-view/3486>\
**Category:** Product\
**Tags:** ui-ux, performance\
**Created:** [May 7, 2024, 7:03pm UTC](https://forum.communityhealthtoolkit.org/t/performance-improvements-on-the-contacts-page-detail-view/3486 "2024-05-07T19:03:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/michael/32/319_2.png) [@michael](https://forum.communityhealthtoolkit.org/u/michael)\
**Post date:** [May 7, 2024, 7:03pm UTC](https://forum.communityhealthtoolkit.org/t/performance-improvements-on-the-contacts-page-detail-view/3486/1 "2024-05-07T19:03:39Z")

</div>

**TL;DR** _We made some updates to cht-core that will make the Contacts Page faster. Below I highlight how we went about this and how we used apdex to quantify the changes._

# Overview

As a part of our work to make the CHT faster for health workers, we released features in 4.7.0 that make it easier to understand the performance of CHT apps. These features can not only help identify slow areas of the app, they can also help us quantify the impact of changes we make in attempts to make them faster. To learn more about those features and how to use them, check out [this forum post](https://forum.communityhealthtoolkit.org/t/evaluating-app-performance-using-apdex-lets-dive-in-and-look-at-an-example/3475).

## Area of focus

The Detail View of the Contacts Page is where you see the [profile](https://docs.communityhealthtoolkit.org/apps/features/contacts/#profiles) of a person or place (CHW Area, Household, etc…). The contents of the detail view can vary widely depending on configurations for things like [Contact Summary](https://docs.communityhealthtoolkit.org/apps/features/contacts/#contact-summary) and [Condition Cards](https://docs.communityhealthtoolkit.org/apps/features/contacts/#condition-cards), but the performance of this page also depends on things like the number of child contacts, reports, and tasks the user has as well. We chose to work on this page because it is one of the most used areas of the app.

## How we tested

1. Set up a server with a **configuration** that mimics a large scale MoH project
2. Set up an **offline CHW** user
3. Loaded the user’s account with **~7k docs**
4. Ran automated scenarios on a **physical device** (_Safaricom Neon Ray with 2GB RAM_)
5. The **scenarios** included navigating through different areas of the app, including a: CHW Area, Household, and Person
6. **Repeated** the scenario 60 times
7. Looked at the **telemetry** data to establish a **baseline** apdex score for each
8. Looked at the cht-core code to identify **areas for improvement** and made those changes
9. **Tested everything again** , comparing against the baseline score

# Results

For each of the the different profiles highlighted below, I have included the apdex score for the Baseline, which is the “Before” we made changes, as well as the “After”, which included the changes. (_Check out [this forum post](https://forum.communityhealthtoolkit.org/t/evaluating-app-performance-using-apdex-lets-dive-in-and-look-at-an-example/3475) to learn more about apdex scoring_)

_Apdex scoring_

 ![Screenshot 2024-05-06 at 12.34.35 PM copy](https://communityhealthtoolkit.b-cdn.net/uploads/default/original/2X/4/435b252049f3757f7400f1851cc90f2f0fb57ccc.png)

#### CHW Area

The baseline score was 0.76 (Fair) and after changes was 0.88 (Good).

| Snapshot | Satisfied | Tolerable | Frustrated | Total | Apdex Score | Level |
| --- | --- | --- | --- | --- | --- | --- |
| Baseline | 32 | 27 | 1 | 60 | 0.76 | (‒) Fair |
| **After** | **47** | **12** | **1** | **60** | **0.88** | **(✓) Good** |

#### Household

The baseline score was 0.64 (Poor) and after changes was 0.78 (Fair).

| Snapshot | Satisfied | Tolerable | Frustrated | Total | Apdex Score | Level |
| --- | --- | --- | --- | --- | --- | --- |
| Baseline | 15 | 45 | 0 | 60 | 0.63 | (✖) Poor |
| **After** | **35** | **24** | **1** | **60** | **0.78** | **(‒) Fair** |

#### Person

The baseline score was 0.99 (Excellent) and after changes was 1.00 (Excellent).

| Snapshot | Satisfied | Tolerable | Frustrated | Total | Apdex Score | Level |
| --- | --- | --- | --- | --- | --- | --- |
| Baseline | 59 | 1 | 0 | 60 | 0.99 | (★) Excellent |
| **After** | **60** | **0** | **0** | **60** | **1.00** | **(★) Excellent** |

# How this affects your app

The results I shared above may vary based on your configuration, the number of docs users have, and the devices you use, but _ **the changes we made were in cht-core so they are applicable to all apps** _.

# Summary

With this first pass at changes, we were able to make meaningful improvements to some slow areas of the app, but there is still room for further improvements. Some of the performance improvements are included in [4.7.0](https://docs.communityhealthtoolkit.org/core/releases/4.7.0/#performance-improvements) and others will be in the next release.
