Feature Testing: Enketo 7 Uplift for CHT Core

Hi there!

The Allies group on the Product Team is excited to announce we have not one, but two Feature Releases (FR)! The first FR is 4.4.1-FR-enketo-7-beta.1, which is based on CHT Core version 4.4.1 but with one change: Instead of Enketo Core 5.18 it includes Enketo Core 7.2. The second FR is the same as the first, but makes Enketo computeAsync be set to true. We hope this will make forms with complex calculations based on Enketo’s docs:

Re-computations of the evaluation cascade will be performed asynchronously to reduce time spent blocking UI updates. This may be improve perceived performance on large forms with complex chained computations. These computations are technically delayed and will perform more slowly, but their corresponding UI updates will render more quickly as each step in the chain of computations completes.

Just in case there’s any regressions with computeAsync and to also enable side by side speed improvement comparisons, we’ve made the two FRs available.

To install these on a production instance, you need to edit your docker compose file to replace each image: version with the corresponding version for the FR - so either 4.4.1-FR-enketo-7-with-async-compute-beta.1 or 4.4.1-FR-enketo-7-beta.1. For example, the public.ecr.aws/medic/cht-nginx:4.4.0 value would be changed to:

  • Enketo with Async FR: public.ecr.aws/medic/cht-nginx:4.4.1-FR-enketo-7-with-async-compute-beta.1
  • Enketo FR: public.ecr.aws/medic/cht-nginx:4.4.1-FR-enketo-7-beta.1

This translates to 5 image: version changes in your compose file for:

  • API
  • Sentinel
  • nginx
  • haprox
  • haproxy-healthcheck

If you’re wanting to test locally in a development environment, you can use Docker Helper to more easily set up a test environment. Here’s a video walking through the FR and using Docker Helper below.

Please post back with any questions or comments!

3 Likes

I’m excited to follow the above post with some metrics about how much faster the new version of Enketo is in these Feature Releases (FRs)!

Let’s cut to the chase and show two graphs illustrating the performance gains of loading a very complex contact form and then we can follow up with what they mean:

The first chart “Single Form Load Time” shows that CHT 3.15.0 took just over 30 seconds to load the test form. CHT 4.0.1 and 4.5.1 show an improvement of this form load time. However, the last two bars show that upgrade from FR with Enketo Core 5.18 upgraded to 7.2 gives us another huge boost reducing the load time to about 12 seconds.

The second chart “Improvement over 3.15” shows the percentage gain in speed. While maybe a bit contrived, it is still none the less amazing that an upgrade from 3.15 to the FR yields an almost 60% performance gain. Even an upgrade from 4.0.1 to the FR shows an impressive 38% improvement.

Of course, we were really hoping that the FR with Enketo computeAsync be set to true would have yielded even faster results than than the other FR. Given the limited scope of these tests (see below), we’re still hopeful that this change will be beneficial for partners. We’re going to continue to test, but we’d love to hear back from others who have run their own tests!

NOTE: These were run on Chrome on a desktop with “CPU Throttle” set to 6x instead of being run on a physical mobile device. A complex form known to be slow on 3.15 was used as a test by loading it 5 times in each CHT version and taking the average time. While not a guarantee of performance gains, spot checking a physical device showed similar gains.