An user doesn´t want to wait long for a form to load. I think that 10 seconds is an accaptable time for a form to load. I have discovered that the loading time differs between iOS, Android and Windows (PC). One of my form takes 11 second to load on iOS and 45-50 seconds on Android and Windows. The hardware on my Android devices is brand new (Sony Xperia z5) and my windows computer is powerful.
It must be some difference in the code that causes this big differences. Have other users experienced similar behaviour and do you know if it is some elements in the form that is known to cause slow loading time on Android and PC?
Does this apply to the form being reloaded subsequent times?
No - it appears even after I use the form the first time on an Android device.
Hi Johan,
What you're describing sounds quite unusual - we normally don't see much difference in terms of performance for loading forms. Can you share the form or at least describe (number of questions, choices, relevancy/calculations)?
A couple of questions/issues:
1) In a few places, you are specifying the bind::Esri:fieldType value. These need to match the keyword in the 'types' sheet exactly
2) Much of the complexity of your survey could be reduced by using repeats. (Provtya 1 - 18 groups look like the same questions).
3) I assume the reason you're not using repeats is the summary calculations you do at the end of the form, since Survey123 cannot yet sum over repeats. It looks like many of your calculations could be simplified by using the 'sum' function, or perhaps those calculations could be generated later than on the form.
4) There seem to be a lot unnecessary bind::type values - they don't need to be set for every question, just the ones where the default type don't match what you want (select_one, calculate). Removing the bind:type field seems to improve performance a bit.
That being said, I do see better performance of the form on iOS then on Android and Mac
Thanks for a fast reply,
1 ) Good point - a small increase was noticed
2 ) The user need to get the calculation in an offline environment in order to make a correct decision. I am looking forward to a calculation among repeats and voted on: Survey 123 built-in functions . It would make this form faster, better and more beautiful.
3 ) I have never heard about the sum function and I could not find it in the documentation (Formulas—Survey123 for ArcGIS | ArcGIS ). Could you please tell me about the function and the syntax.
4 ) Se point 1.
By the way - it loaded fast on Survey123 for Arcgis (Beta) on Windows, 8 seconds. It takes far more time to load on Survey123 Connect for Arcgis (40 seconds).
It looks like it is a problem with bind::Type - it works in Survey123 Connect - but not on Android and iOS. I have a select_one field and give it bind::type decimal. In Survey Connect I could use them in a calculation, but on Android and iOS it doesn´t work. In order to get it work in a calculation I use ${Field1}*1 or number(${Field1}.
Is "number" faster than using *1?
On sum() - you're correct, we don't have id documented; it's generally used in context of the repeat (as you mention in point 2) and would add all the values for a given question across repeats. It also appears to work if you pass a sequence of questions (for example, sum(${Provyta1},${Provyta2},${Provyta3},${Provyta4},${Provyta5},${Provyta6},${Provyta7},${Provyta8},${Provyta9},${Provyta10},${Provyta11},${Provyta12},${Provyta13},${Provyta14},${Provyta15},${Provyta16},${Provyta17},${Provyta18}) ) but gives warning on XLSForm validation.
I'll try to reproduce the bind::type issue you describe on iOS/Android.
I would think number(${Field1}) would be faster because ${Field1}*1implies conversion to number and then multiplication, but haven't tested it.
Great to hear about the sum function - it will be a great help for us when calculate things from repeats.
I tried it the sum function, but ran into some problem that said something about reference and similar things, I guess that there is some things need to be solved Before it is possible to solve. Do you have a form with the sum function working in repeats? It would be interesting to check it out?
I tested your assumption that number was faster and I Think it is correct. It is hard to measure speeds because the forms load faster when it is used the first time.
Kudos.