Bug 239891 - OperationGenerator.generateUpdates is slow in large installs
Summary: OperationGenerator.generateUpdates is slow in large installs
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 238312
  Show dependency tree
 
Reported: 2008-07-07 17:50 EDT by Simon Kaegi CLA
Modified: 2008-08-08 01:45 EDT (History)
0 users

See Also:


Attachments
patch (2.74 KB, patch)
2008-07-09 13:06 EDT, Simon Kaegi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2008-07-07 17:50:09 EDT
When looking for update between our "to" and "from" list of IUs our current algorithm is O(n^2). With a hash lookup this could be O(n).

See:
OperationGenerator.generateUpdates (line 82)
Comment 1 Simon Kaegi CLA 2008-07-09 13:06:26 EDT
Created attachment 106979 [details]
patch

This adds the use of a hashmap by Id to allow us to lookup matching update sources quickly.
Comment 2 Simon Kaegi CLA 2008-07-14 17:46:03 EDT
I've committed to the 3.5 stream to allow further testing.
Comment 3 Simon Kaegi CLA 2008-08-08 01:45:49 EDT
Marking fixed along with bug 238312