Bug 239860

Summary: EquinoxBundleState.convert should use a hashmap lookup
Product: [Eclipse Project] Equinox Reporter: Simon Kaegi <simon_kaegi>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 3.4Flags: john.arthorne: review+
Target Milestone: 3.5 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 238312    
Attachments:
Description Flags
patch none

Description Simon Kaegi CLA 2008-07-07 15:30:49 EDT
When converting BundleDescriptions to BundleInfo we end up doing a linear search for bundles with a matching location. This is n^2 because the search is done for every bundle. We should look at storing an index by location in EquinoxBundlesState or perhaps doing the iteration more efficiently in EquinoxBundlesState.convertState.

see:
EquinoxBundlesState.convert (for loop starting on line 440)
EquinoxBundlesState.convertState
Comment 1 Simon Kaegi CLA 2008-07-09 12:57:21 EDT
Created attachment 106976 [details]
patch

This patch create a HasMap by location of the current bundle info objects and uses this to lookup settings when converting each individual bundle.
Comment 2 Simon Kaegi CLA 2008-07-14 17:44:21 EDT
I've committed to the 3.5 stream to allow further testing.
Comment 3 Simon Kaegi CLA 2008-08-08 01:43:59 EDT
Marking fixed along with bug 238312