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

Location.isInHierarchy is inefficient

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Non-Essential
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.9.0
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low

      Description

      Darius –

      In my wading through code, I ran into isInHierarchy() in Location.java. You start at the root and generate all children looking for the location. It would go a lot faster if you started with the location and chained up through parents looking for root. And recursion is fun but iteration is faster.

      Thanks, Roger

        Attachments

          Activity

            People

            • Assignee:
              darius Darius Jazayeri
              Reporter:
              r.friedman Roger Friedman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: