[Framework] Resolver could be more efficient if it detected if fragments were 
present
-------------------------------------------------------------------------------------

                 Key: FELIX-2909
                 URL: https://issues.apache.org/jira/browse/FELIX-2909
             Project: Felix
          Issue Type: Improvement
          Components: Framework
    Affects Versions: framework-3.2.0
            Reporter: Richard S. Hall
            Assignee: Richard S. Hall
            Priority: Minor
             Fix For: framework-4.0.0


When fragment handling was moved into the resolver for the 3.2.0 release, it 
introduced a minor but not insignificant performance penalty. The old fragment 
approach was handled by the state and it was able to merge fragments into hosts 
at install time, which only had to be done once. The new resolver has to try to 
merge fragments each time there is a resolve operation. Further to correctly 
handle fragments, the resolver needs to build a more complicated candidate data 
structure. These two issues were the cause of the performance penalty.

Unfortunately, it is not possible to completely eliminate the performance 
penalty because these issues represent necessary processing. However, we could 
try to be a little smarter and only do the extra processing when fragments are 
actually present in the candidate graph. Related to this, they way fragments 
are greedily resolved in the new resolver also exacerbated this issue since it 
was always trying to resolve any existing fragments even if they weren't 
necessary for the current resolve. So, we can also be smarter here and only 
greedily resolve fragments if their hosts are being resolved.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to