Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-3897

Add caching in ORUR01Handler or Context for repeatedly used domain objects

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Ready for Work
    • Priority: Could
    • Resolution: Unresolved
    • Affects Version/s: OpenMRS 1.9.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Complexity:
      Medium

      Description

      With TRUNK-3896, ORUR01Handler now asks for a location from the LocationService (via Context) for each Encounter. When processing a backlog of 2000 HL7 messages, each additional database hit increases the end running time 2000x.

      Soon enough, we will get tired of invalid data coming from the ORUR01Handler. An example of this is when an incoming OBX is marked as ST datatype, the value is always stored in obs.valueText regardless of the concept's datatype. We should probably be using Obs validation, or at least performing some fast version of it, to ensure at least the HL7 data matches our model.

      This means hydrating a cache of concepts, and that cache could also contain encounter types, locations, etc for use in creating and subsequently saving each encounter. If we do caching at the Context level, it may help all around ... but I don't know many other services in OpenMRS that process data in such a high volume.

      I am willing to help with load testing the ORUR01Handler to demonstrate the performance hit after adding this cache.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jeremy Jeremy Keiper [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days
                  2d
                  Remaining:
                  Remaining Estimate - 2 days
                  2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified