John Ross created ARIES-1388:
--------------------------------

             Summary: 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


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)

Reply via email to