[
https://issues.apache.org/jira/browse/ARIES-1389?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Ross resolved ARIES-1389.
------------------------------
Resolution: Fixed
http://svn.apache.org/r1698435
> Compute service requirements and capabilities once in BundleRevisionResource.
> -----------------------------------------------------------------------------
>
> Key: ARIES-1389
> URL: https://issues.apache.org/jira/browse/ARIES-1389
> Project: Aries
> Issue Type: Improvement
> Components: Subsystem
> Affects Versions: subsystem-2.0.2
> Reporter: John Ross
> Assignee: John Ross
> Labels: performance
> Attachments: ManyFeaturesWithSharedBundlesTest.java, Screenshot-Java
> Monitor.png, after.cpu, before.cpu
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)