ConceptService#getConceptsByClass(…) uses Lucene under the hood! I think the reason for this was to achieve reusability of this complex method that leverages Lucene. However this gets superfluous to take such a long route when we have a
ConceptClass at hand. For some reasons that I’m not certain of, relying on Lucene slows down the retrieval of data in this context! This becomes so critical if the API is consumed by an HFE tag that is processed multiple times by the
Our Experience with the
<condition/> HFE tag
<condition/> tag somewhere relies on this API… We have an HFE form that consumes this tag. However, we may want to record upto 10 conditions in an encounter, so this tag is replicated 10 times by the
<repeat/> tag; meaning this API would be hit 10 times causing a significantly slowed down yield of results! On my dev machine, it takes upto 2 minutes to load such a form; a machine with lower specs might just timeout!
Well this is quite an issue and a blocker within our implementation and we thought of having Introducing an ad-hoc DAO layer to retrieve concepts by class within HFE module for now as we discover how to optimise core?
Any thoughts or earlier findings are welcome