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.
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
- Set up a server with a configuration that mimics a large scale MoH project
- Set up an offline CHW user
- Loaded the user’s account with ~7k docs
- Ran automated scenarios on a physical device (Safaricom Neon Ray with 2GB RAM)
- The scenarios included navigating through different areas of the app, including a: CHW Area, Household, and Person
- Repeated the scenario 60 times
- Looked at the telemetry data to establish a baseline apdex score for each
- Looked at the cht-core code to identify areas for improvement and made those changes
- 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 to learn more about apdex scoring)
Apdex scoring
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 and others will be in the next release.