Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-1388

Compute requirement filters only once.

    XMLWordPrintableJSON

Details

    Description

      ResourceHelper.matches(Requirement, Capability) is an often used method during resolution. Currently, it recomputes the requirement filter with each call.

      The measurements used the same test scenario being developed as part of ARIES-1357. The time it took to install 50 features was measured. Each feature consists of 10 bundles plus one application. All features share the same 10 bundles. Each bundle exports 5 unique packages. Each application consists of 10 unique bundles. The bundles import packages offered by the containing feature.

      The baseline average time for installing all 50 features was 67.9 seconds.

      AbstractRequirement will now lazily compute the requirement filter when asked for the first time. Subsequent calls will return the already computed value.

      ResourceHelper now asks whether or not the Requirement is an instance of AbstractRequirement. If so, it asks for the filter directly. If not, the filter is computed as before.

      After these modifications, the average time for installing all 50 features was 46.6 seconds, a 31.3% improvement.

      Attachments

        1. 1440774382251.cpu
          77 kB
          John Ross
        2. 1440774693330.cpu
          75 kB
          John Ross
        3. ManyFeaturesWithSharedBundlesTest.java
          9 kB
          John Ross
        4. Screenshot-Java Monitor.png
          424 kB
          John Ross

        Issue Links

          Activity

            People

              jwross@us.ibm.com John Ross
              jwross@us.ibm.com John Ross
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: