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

Speed up HibernateUserDAO.getUsers method

    Details

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

      Description

      The HibernateUserDAO.getUsers method can be really really slow. For example HTML Form Entry uses it to find users with any name, and role="Provider" and in Dave's test case it takes 43 seconds to run.

      The primary goal of this ticket is to try to rewrite that method using the "some elements(...)" HQL feature.

      A secondary goal could be to try adding a batch-size="1000" on Users.roles, so we don't get the "N+1" selects problem

        Attachments

        1. screenshot-1.jpg
          299 kB
          Dave Thomas [X]
        2. screenshot-2.jpg
          277 kB
          Dave Thomas [X]

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                darius Darius Jazayeri [X] (Inactive)
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: