Improve CommCare Form Performance


I have a form with a large number of questions (>200) and an even greater number of hidden value calculation fields. Any tips on how to improve performance on the CommCare Android application would be greatly appreciated. We are using Android tablets purchased from WalMart (onn. 8" Tablet, Android 11, 2.0 GHz quad-core processor, 2 GB RAM). Additional details are below:

The form uses heavily uses branching logic ("Display Condition" logic). The performance is worse (many seconds lag when selecting a single-select option, as well as similar lag between typing each letter for a text input) in the questions early on in the form since they are used to determine eligibility to access the later part of the form that is all contained within a "Group" that uses appropriate "Display Condition" logic.

In addition, the form heavily uses hidden value calculations in the later part of the form to access lookup tables. These lookup tables have already been divided into smaller lookup tables (100-500 rows each) to improve performance.

Any recommendations to improve performance would be a big help. In addition, answers to the following questions would be very helpful:

Does CommCare do any background processing of hidden values that have Display Conditions that evaluate to False?

Should it improve performance if hidden values have Display Conditions (or are in a Group with a Display Condition) that ensure it only evaluates to True when all values that will be used in the calculation have already been collected? For example, if I have a hidden value that is dependent on 5 separate questions, should I use a Display Condition on the hidden value that will only evaluate to True once the 5th question has been answered?

Thank you

I do not think that there is any fast and effective way to improve the performance of your form given your current form structure.
The only way to get it done is to make your form shorter and divide the questions between different forms. Never make such a complicated form with soo many questions and with these many complicated hidden values.
I would still suggest you write to the commcare support and see if they can help. But even we have experienced the same in the past and the only thing they will ask us to do is to shorten our forms.


Try putting your questions into question groups, not lists, and as a last resort, put your heavy calcs that look into lookup tables in if statements that check if the last question in the form has been answered "or whichever question is relevant" and return a value if not, and perform the calculation when it is.

you can also check out this function CommCare Functions - CommCare Public - CommCare Public