This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 368064 - [UI] Capability index is not used when expanding categories in the UI
Summary: [UI] Capability index is not used when expanding categories in the UI
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.8.0 Juno   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: Juno M7   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 263966 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-06 17:19 EST by Ian Bull CLA
Modified: 2012-04-30 15:58 EDT (History)
7 users (show)

See Also:


Attachments
Patch v1 (2.03 KB, patch)
2012-01-06 18:17 EST, Ian Bull CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2012-01-06 17:19:00 EST
This is likely even more far reaching than the UI, but I found it there.  

If you search for things in the p2 UI you will notice it's really slow. I spent some time on this today, and it turns out that the problem is in computing categories. When you search for things, all categories are expanded and this is the performance hit we are seeing.

This is because the capability index is never used, and for each category we check each IU to see if it fits.  

It appears that the index is expecting us to look for 'provided capabilities' but instead we are checking to see if an IU 'satisfies' a requirement.  Since this is not something the index knows about, it's not use.

However, if we pull the query apart a bit and realize that it's actually just IRequirements[], we can actually make use of the index and this increases performance dramatically.
Comment 1 Ian Bull CLA 2012-01-06 18:17:56 EST
Created attachment 209163 [details]
Patch v1

Here is a patch. I wonder if someone with more query experience can give this a look over?
Comment 2 Pascal Rapicault CLA 2012-04-30 15:29:02 EDT
*** Bug 263966 has been marked as a duplicate of this bug. ***
Comment 3 Pascal Rapicault CLA 2012-04-30 15:58:40 EDT
Released the attached patch.