Very slow form when using enketo (multiple repeating groups with calls to concat())

Hi @Kal_lam and everyone else,

I am experiencing severe slowness when using Enketo web forms on low- to mid-range Android tablets. My survey consists in 21 repeating groups, all displayed on a single page (all within a group with field-list appearance).

I suspect that the slowness is due to the calculations I am running. In each repeating group, following a “text” question named “enternameGROUP” (where GROUP is a suffix for the repeating group in which this appears), I perform the following:

type name calculate
calculate alter_textGROUP concat(“somestring”, position(…), “: ”, ${entername}, “ somestring ”)

Immediately after closing the repeating group, I concatenate all the values in alter_textGROUP:

type name calculate
calculate new_altersGROUP concat(${alter_textGROUP})

I use this to create one “new_altersGROUP” per repeating group. So after the first repeating group I have the form creates new_alters1, after the second repeating group new_alters2, etc.

In each group, I present all the “new_altersGROUP” variables that have already been created in a note. For example, in repeating group 2, I have the following field:

type name calculate
note namesfromprev2 ${new_alters1}

In repeating group 3

type name calculate
note namesfromprev3 ${new_alters1} ${new_alters 2}

etc.

The resulting form, with 21 repeating groups, is unusably slow. Specifically, clicking the “+” button in any of the repeating groups will hang the form for multiple seconds (4 to 5 seconds at best, more in some cases). My workflow requires the ability to very rapidly add elements to the repeating groups. (I am asking questions in which a respondent lists other people quickly. For each person I need to click the plus, add the person named. And only once respondent has finished listing out people do I ask the other questions in the repeating group.)

I am looking for help on how to make the form more responsive. The key think I need to achieve is

  • Repeating groups that are ideally all visible at the same time, where I can very rapidly add new entries using the + button on enketo web forms
  • The ability to show all answers for a particular question in previously entered repeating groups

Additional information:

  • I previously had a workflow where I performed one more concatenation, so I could store all previously entered answers in a single variable: concatenate new_alters1 and new_alters2 in a variable previous_alters2, then concatenate new_alters3 with previous_alters2 in a variable previous_alters3, etc. This was even slower.

  • Each repeating group has some 10 to 15 questions in total. One of these is a select_one_from_file that pulls from a csv with 3700 rows

Welcome to the community, @ivandx! Could you kindly share your XLSForm and the CSV file with the community so that the community should also be able to test it for you?

Hi,

Since posting I have actually shifted away from Enketo to Kobo Collect. This sacrifices the ability to show all questions on a single page, but everything is much more responsive on Kobo Collect, so it’s a price I’m happy to pay.

Thank you for offering to help anyway, and apologies if you read through my long post for nothing.