I have installed CIEL concept dictionary and forms are working slow.Could someone help me how to increase the performance and What the reason behind slowdown the form.
Hi @mukesh,
Can you provide the following detail:
- OpenMRS version
- Did you upgrade your dictionary or importer the first time?
- Can you describe how slow the Html forms are? Is it when you load a form or on saving new data?
Hi @owais.hussain Thanks for reply.With respect to your queries I am using openmrs version -2.1.3. -Previously I was using default concept dictionary of openmrs in which we have created our custom concept.After that we import CIEL concept and also load our own custom concept.CIEL concept share by Andrew. -Forms are taking 1 min to load and same time to save.
If this is the only change you have made and nothing else, then as first step, I would suggest you to go to Administration > Search Index > Rebuild Search Index.
This will add the newly imported concepts into search index, resulting in faster search.
Please note that it may take a couple of hours for the search index to be rebuilt…
I have already done this operation but not getting success.
Can you please go to Concept dictionary and search for a couple of concepts by name, and tell me how long it’s taking?
I have searched GENTAMYCIN which is in CIEL dictionary.OpenMRS takes only fraction of second to search GENTAMYCIN.
Strange. Would you mind sharing source code of either of your ill-performing HFE forms?
Sorry.Right now I have no privilege to share the code.Meanwhile I share What we have done in the form.This form is huge and using repeat tag.Almost 30 concept are coded in repeat tag.
No worries. 30 concepts shouldn’t make such a difference. But the repeat tag could complicate the page depending on the frequency. Can you check one of the simpler forms, which aren’t using repeat tag?
Sure.Let me try.
I am also unsure how you were able to simply load CIEL and then your custom concepts into the same table. I presume your HTML forms were using your custom concepts prior to loading CIEL. How were you referencing the concepts in the forms? Concept_ID or UUID? You now have many more concepts than you had originally, so I am wondering if the id referencing in the forms is causing the issue. If you create a new simple form using a few of the same references does it take as long to load?
Hi Andrew,
Yes, we were earlier using our custom concepts and then we moved on to CIEL. Currently we are using both the dictionaries. Ours and the CIEL. We are using Concept ID’s in the html forms
A normal form takes less than 4 secs to load.This is a specific form which contains 13 collapsible sections, each of which has an autocomplete or a datepicker or diagnosis element.
I have removed repeat tag and reduced time to 18 sec but still this form is slow.Form is loading with 100+ concept.
Can this be debugged to see where the delay is coming from? I don’t know if other users like @ball might have some experience here. Would changing the references to UUIDs potentially speed access? Is there a missing index on Concept_ID?
@mukesh, @sameermotwani11, it sounds a bit similar to this: What is the best way to implement observations form in OpenMRS 2x?
The above thread does not quite provide any decisive answers except for the fact that you should try to strip down your form(s) in order to isolate and pinpoint what looks like multiple and hopefully separate performance hits. …that should then be addressed in HFE UI I presume.
From the distance it looks like:
- Having a lot of metadata fed to the forms (CIEL vs a smaller initial custom set) unveils performance issues.
- The repeat tag unveils performance issues, and we shall try to find out in which context exactly.
- … etc
Any chance you can investigate and come up with something reproducible?
@mukesh and @sameermotwani11, another point is: beware of how HFE UI is handling JavaScript additions in your forms. JS snippets might be reloaded (and hence rerun) multiple times when they ideally shouldn’t, that’s another direction of investigation. So the updated investigation list:
- Having a lot of metadata fed to the forms (CIEL vs a smaller initial custom set) unveils performance issues.
- The repeat tag unveils performance issues, and we shall try to find out in which context exactly.
- JavaScript additions might be processed multiple times leading to an overall slowdown.
- …
Credits to @amine for reminding me about 3.