-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate performance of action forms in 2.13 #3837
Comments
I've managed to eek out some small gains in the contact summary service but putting breakpoints in the code it looks like the bottleneck is Enketo rendering. @abbyad Is there a 2.12 instance with the same forms we can use for comparison? @alxndrsn Any ideas? Do you think it could be related to binding the contact summary into the form? You can test 2.13.0 here: https://standard.app.medicmobile.org/medic/_design/medic/_rewrite/#/contacts/02a2c7eba7e4f4a92aa04ff5c2072419/report/delivery |
Don't compile it every time the contact summary is requested. Invalidation is handled by the page being refreshed on configuration change. #3837
Don't compile it every time the contact summary is requested. Invalidation is handled by the page being refreshed on configuration change. #3837
I've merged my caching improvements to master and we can backport if it'd help but I think there's something else going on that I haven't been able to detect yet... |
I will create and post links to forms today with minor variants that seem to have some effect on performance so that they can be profiled. |
Here are some variants of the delivery form, which I then tested on @alxndrsn offered to do some detailed profiling of the forms, but in the meantime here are some stopwatch results:
Opening the forms from the History tab does not run From this quick analysis it looks like removing unused |
Just a note that I did some quick testing on a Tecno Y4, v2.13.0-beta.10, container v0.3.6 and I don't see a noticeable difference between the contacts tab and history tab. I also don't think the performance has degraded significantly, but it is definitely slower to open forms than it was in the past. I also noticed that |
On remote serverThe first five network requests when loading the linked contact are impressively slow: |
As requested by @alxndrsn, here is a version without the This can also be seen in action on standard.app |
Don't compile it every time the contact summary is requested. Invalidation is handled by the page being refreshed on configuration change. #3837
Loading this form calls |
From a page refresh:
Time to load was measured for Toronto Health Centre in Firefox after loading a few forms for the same user, including the form in question. A single timing was taken. Observations
|
ConclusionRemoving the
|
Form | jsEvaluate() count (with patch) |
jsEvaluate() count (without patch) |
---|---|---|
0 - No Change | 2452 | 58 |
1 - No Translations | 856 | 58 |
2 - No Secondary Instance | 856 | 58 |
3 - No db-object | 170 | 54 |
4 - No outputs | 52 | 52 |
Recommendation
Re-deploy webapp to[DONE]standard.app
with `jr:choice-name() patch removed and test performance- find a replacement for our
jr:choice-name()
and update our forms
References
The final tests above were done on |
|
Form | jsEvaluate() count (with patch) |
jsEvaluate() count (without patch) |
---|---|---|
0 - No Change | 2566 | 84 |
Patch is to provide second-level calculations based on jr:choice-name()
.
I've manually removed the |
After discussion with @alxndrsn we will attempt to get around the (over)use of One strategy is to use However this gives the following error: The form issue-3837-0-5-no-choice-name.zip can be seen in standard.app |
@alxndrsn This is marked for "Code review" but I think it should be "Won't fix: Not an issue" because there's no code change. Does that make sense? |
I'd quite like someone to check my working 😄 Also I don't think "not an issue" is a very helpful label when this clearly is an issue. Just not one whose solution can be tested or released in the standard way. |
@garethbowen did you check this before changing the status? |
The logic looks fine to me. I put it in AT so the performance could be tested. |
I haven't made any changes to code. |
The performance AT is blocked on #3870 |
This ticket was to investigate the performance; I was requesting a review of my investigation. Acceptance testing is to e.g. check the conclusions & recommendations I made. |
As discussed in the planning meeting: the investigation is done, and performance improvements can be tested with #3870 |
With 2.13.0-beta.10 it is taking ~5-12 seconds to load Action forms on standard.app (eg the Delivery form). It seems to take longer from the contact profile vs from the history tab. This could perhaps be related to
inputs
being populated, which contains adb-object
.We need to investigate this further to characterize the performance and determine if 2.13 can be released as such.
The text was updated successfully, but these errors were encountered: