[
https://issues.apache.org/jira/browse/ARIES-1388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Ross updated ARIES-1388:
-----------------------------
Attachment: Screenshot-Java Monitor.png
1440774693330.cpu
1440774382251.cpu
ManyFeaturesWithSharedBundlesTest.java
> Compute requirement filters only once.
> --------------------------------------
>
> Key: ARIES-1388
> URL: https://issues.apache.org/jira/browse/ARIES-1388
> Project: Aries
> Issue Type: Improvement
> Components: Subsystem
> Affects Versions: subsystem-2.0.2
> Reporter: John Ross
> Assignee: John Ross
> Labels: performance
> Attachments: 1440774382251.cpu, 1440774693330.cpu,
> ManyFeaturesWithSharedBundlesTest.java, Screenshot-Java Monitor.png
>
>
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)