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

Compute service requirements and capabilities once in BundleRevisionResource.

    XMLWordPrintableJSON

Details

    Description

      BundleRevisionResource computes the service capabilities with each call to getCapabilities. Testing has shown that this is having an unacceptable performance impact.

      Profiling showed that BundleRevisionResource.getCapabilities was taking up 16.9%, or 7368 ms, of the total time. After the optimization, this was reduced to 0.1%, or 50 ms.

      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.

      Baseline

      Average time across 1 trials: 42352.0 ms
      Average time across 1 trials: 43709.0 ms
      Average time across 1 trials: 43309.0 ms
      Average time across 1 trials: 43234.0 ms
      Average time across 1 trials: 41946.0 ms

      Total Average: 42910

      BundleRevisionResource Optimization

      Average time across 1 trials: 32743.0 ms
      Average time across 1 trials: 33094.0 ms
      Average time across 1 trials: 32905.0 ms
      Average time across 1 trials: 32015.0 ms
      Average time across 1 trials: 32226.0 ms

      Total Average: 32596.6

      A 24% overall improvement. The solution was to compute the service capabilities once at object construction time. The same strategy was also employed for service requirements in anticipation that the same performance bottleneck would exist there, although that was not tested here.

      Attachments

        1. Screenshot-Java Monitor.png
          397 kB
          John Ross
        2. after.cpu
          72 kB
          John Ross
        3. before.cpu
          66 kB
          John Ross
        4. ManyFeaturesWithSharedBundlesTest.java
          9 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: