Performance Improvements on the Contacts Page | Detail View

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.


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.

Area of focus

The Detail View of the Contacts Page is where you see the profile 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 and 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


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 to learn more about apdex scoring)

Apdex scoring
Screenshot 2024-05-06 at 12.34.35 PM copy

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


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 (:heavy_multiplication_x:) Poor
After 35 24 1 60 0.78 (‒) Fair


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.


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 and others will be in the next release.

1 Like