Evaluate performance of ODK apps

Dear good afternoon from Argentina!

A pleasure to greet you!
The reason for this query is due to an inconvenience that we detect in the performance of the ODK apps when it has many calculate and many values to validate.

1. What is the problem? Be very detailed.
The problem occurs when the amount of data entered in total is very high as for example 1400 data entered at the end of the form, save it and validate the response, remains hours doing this operation and even often does not complete it. A particularly is that the forms has several repeat and several calculate.
I attach the form and the screenshot where it hangs.

2. What app or server are you using and on what device and operating system? Include version numbers.
Apps: ODK Collect v1.20.0, Huawei Mate 10 lite
Kobo Server: branch: develop, commit: e04ac6f

3. What you have you tried to fix the problem?
Optimizing the calculations and repeat minimizing everything we could with the advice of Aurelio DiPascuales

4. What steps can we take to reproduce the problem?
1 - Implement the attached form
2 - Load anything in all the fields except the fields:
“Superficie (Has)” enter the value 200
"Tipo de Procedimiento” select Maíz/Girasol
“Plantas” load 40
“Posición (cm) n” always load incremental number ex. 1,2,3

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.
I was in contact with @aurdipas who suggested that I consult and share in this forum. I also think that he already shared and talked with the rest of the community (@yanokwa and others) about this topic.
He also commented to me and I think the issue related to this topic is the following: https://github.com/opendatakit/javarosa/issues/170


We do not know how the community is managed but we would be interested to know how to collaborate ($, time, testing, etc.) to try to solve this problem.

Thank you
Greeting atte
Alvaro Sassano
Skype: alvaro_sassano@hotmail.com

The fundamental problem is that you have a lot of expressions in the calculate and relevance columns. JavaRosa (the form engine) is constantly evaluating those expressions and it takes a lot of memory and processing power.

The options are:

  1. Redesign the form or workflow to reduce the need for that logic (especially posiciones, surcos_desviacion). This is likely the easiest approach.
  2. Make performance improvements to expression evaluation in JavaRosa. The PR you linked to is for improving to external secondary itemsets, so it won't help here.

JavaRosa is a difficult code base to work in and these improvements will require a very good Java developer with experience evolving legacy code. If you can find such a person we'd love their help. The first steps are to profile this form and understand where the performance gaps in JavaRosa are.

Perfect Yaw, if I hope to find it and as soon as we have it, we'll add it to the project to help us with these analyzes and I'll keep you updated.
These analyzes and comments are followed by support ??
Thank you

@Varo Ideally, the person doing the analysis of the performance gaps can propose and implement solutions in JavaRosa. The core developers will help along the way.

@yanokwa perfect!! Thanks you very much.