You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Thomas Watson (JIRA)" <ji...@apache.org> on 2017/01/19 21:49:26 UTC

[jira] [Created] (ARIES-1667) findCandidates for already resolved resources is slow

Thomas Watson created ARIES-1667:
------------------------------------

             Summary: findCandidates for already resolved resources is slow
                 Key: ARIES-1667
                 URL: https://issues.apache.org/jira/browse/ARIES-1667
             Project: Aries
          Issue Type: Bug
          Components: Subsystem
            Reporter: Thomas Watson


org.apache.aries.subsystem.core.internal.ResolveContext.processWire(Wire, Requirement, List<Capability>)

The processWire method for ResolveContext is used when doing off-line resolution of a subsystem for resources that are already resolved in the host framework (or the system repository).  The problem is the way the candidates are discovered with the existing wirings.  The existing code will iterate over every wire looking for a capability that matches the given requirement.  This is a lot of work because it requires filter matching against every capability the resolved resource is wired to.

I see no reason the filter matching is required here.  We have the resources requirement and the resources wiring wire which uses the requirement.  All we need to do is find the wires that use the requirement.  The capabilities attached to these wires have to match.  Checking for requirement equality should be faster that checking every capability wired to for a match.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)