Huge leap in performance
A new XPath evaluator
We have just completed the most exciting, and largest, Enketo improvement project in years - a new XPath evaluator! If you are not familiar with XPath, it is the logic language of forms in the ODK ecosystem which is used in calculation, constraint, relevant, required, choice_filter, and default formulas.
Back when Medic adopted Enketo in their mobile data collection tools for Community Health Workers, they created a new XPath evaluator to replace the one Enketo was using. This new evaluator turned out to be much faster as it more fully leveraged the native XPath evaluator that is built into modern browsers.
At the time it was created, it did not yet have all the capabilities that the Enketo Project needed to replace its own XPath evaluator. Moreover, the need to support legacy browsers (without a native evaluator) was still holding us back. However, we started planning a long time ago to make Medic’s evaluator fully ODK XForms spec-compliant and have since dropped support for legacy browsers.
With funding from DIAL, OpenClinica, and Medic this XPath library is now fully ready to take over logic evaluation across all Enketo tools!
Enketo Express version 2.6.0 and Enketo Core version 5.17.0 onwards include the new evaluator.
And WOW, the boost in performance has exceeded all expectations! We have evaluated the impact on some extremely slow real-life forms and shared some results below. I should note it is not entirely straightforward to predict the impact for a particular form. We have found (fast) forms that had no noticeable change in loading performance. We have not found any forms that have become slower.
Large internal lists of options
A form containing thousands of “select” options (found here) took over 5 minutes to load with the old evaluator. It now takes 0.4 seconds. A 750x improvement making a previously unusable form perfectly usable! Forms with large ‘internal’ select lists definitely experienced the largest performance improvement (forms with ‘external’ lists were already fast).
Large number of repeat instances
A form containing 45 repeat instances (with repeat_count) from an OpenClinica user, improved its loading performance from 25 seconds to 6.5 seconds - a respectable 4x improvement.
Complex constraint expressions
A form with about 1,000 questions with an enormous quantity of complex constraints from an OpenClinica user improved its loading performance from 7.5 seconds to 0.3 seconds - a 25x improvement!
Thanks
Thanks so much to Medic, DIAL, OpenClinica for making this epic improvement project possible!
Feedback
As always, we’d love to get your feedback. Comment on this blog, tweet @enketo, or post a message in the Enketo forum. If you discover a bug, please let us know what browser you are using.
Past Posts
- 04 Feb 2021 » Huge leap in performance
- 30 Mar 2020 » Important Enketo Express Updates - 03/2020
- 05 Oct 2018 » Encryption
- 30 Jul 2018 » July 2018 Update
- 14 Feb 2018 » February 2018 Update
- 03 Aug 2017 » Signature and Draw widgets
- 13 Jul 2017 » Image Map Widget
- 12 Jul 2017 » Enketo Customization
- 17 Apr 2017 » Repeats Revisited
- 03 Apr 2017 » Autocomplete
- 22 Sep 2016 » Single Submission Surveys
- 18 Apr 2016 » Better Exports
- 07 Jan 2016 » Pulldata support
- 22 Dec 2015 » More Markdown
- 21 Dec 2015 » Page Validation
- 20 Aug 2015 » NDI Election Monitoring
- 17 Aug 2015 » Full Right-to-left Language Support
- 29 Jun 2015 » Auto-save
- 15 Jun 2015 » Performance Boost
- 10 Jun 2015 » Saving Israel's Coastal Iris
- 19 May 2015 » How To Install Enketo On Ubuntu 18.04
- 13 Apr 2015 » Plan Changes
- 10 Apr 2015 » Enketo Roadmap
- 08 Apr 2015 » Exploring the Road of the Queen
- 23 Feb 2015 » Multi-Language User Interface
- 21 Feb 2015 » Introducing Enketo Express
- 20 Feb 2015 » Paste KML Polygons
- 27 Jan 2015 » Combatting Tuberculosis
- 06 Jan 2015 » Enketo Now Fully Open Source
- 01 Dec 2014 » Enketo Presentation at SFI Conference
- 13 Nov 2014 » Collecting User Stories
- 12 Sep 2014 » Hide Inputs in Geo Widgets
- 02 Jul 2014 » Multiple Map Layers in Geo Widgets
- 11 Jun 2014 » Distress Widget
- 23 May 2014 » Enketo in KoBoToolbox
- 22 May 2014 » New Geoshape and Geotrace widgets
- 08 Apr 2014 » Grid Theme
- 27 Mar 2014 » Divide a Form into Multiple Pages
- 10 Mar 2014 » Progress Bar
- 08 Feb 2014 » Enketo Integration into ODK Aggregate
- 07 Feb 2014 » Notes getting fancy
- 06 Feb 2014 » Enketo.org now has a FREE plan
- 09 Jan 2014 » Likert Widget
- 07 Jan 2014 » Horizontal Choice Lists
- 03 Jan 2014 » Draft Records
- 23 Dec 2013 » New Sponsorhips
- 09 Oct 2013 » Enketo Open-Source Developer Community taking off
- 03 Oct 2013 » User Interface Changes
- 04 Sep 2013 » Enketo.org launches!
- 25 Jul 2013 » Galvanizing Enketo
- 13 Jun 2013 » Approaching the stability phase
- 17 May 2013 » Presentation on Enketo for Humanitarian Nomad 2013
- 16 May 2013 » Smart Paper
- 05 Mar 2013 » Enketo starts to fly
- 13 Dec 2012 » Enketo: Why so awesome?
- 12 Sep 2012 » Enketo is now open source and will be used in formhub!
- 21 Aug 2012 » JavaScript XPath Evaluator for OpenRosa
- 06 Aug 2012 » A new name: Enketo
- 27 Jun 2012 » Quick look at Enketo’s launch area
- 04 May 2012 » Enketo’s New Architecture
- 01 Mar 2012 » Internet Explorer 10 & Offline Web Apps
- 07 Feb 2012 » Survey Tools
- 03 Jan 2012 » An Introduction to Enketo
- 21 Dec 2011 » Building a manifest with PHP
- 15 Dec 2011 » Aid Web Solutions is back
- 25 Apr 2011 » Offline-Capable Web Applications
- 24 Dec 2010 » Google Apps in Emergencies
- 15 Oct 2010 » Humanitarian Aid Browsing