Bug 212444 - [prov] [ui] - optimization of viewer content queries
Summary: [prov] [ui] - optimization of viewer content queries
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Incubator (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2007-12-10 14:00 EST by Susan McCourt CLA
Modified: 2008-01-03 11:51 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Susan McCourt CLA 2007-12-10 14:00:09 EST
The UI query providers build compound queries to satisfy conditions like "find all group IU's or nested categories that are members of the given category."  While analyzing bug #211521, I noticed that the compound queries are not constructed with performance in mind.  Consider a query like this:

Query query = new CompoundQuery(new Query[] {membersOfCategoryQuery, new CompoundQuery(new Query[] {groupQuery, categoryQuery}, false)}, true);

This query basically says
isMemberOfCategory AND (isGroup OR isCategory)

It so happens that isMemberOfCategory is the most expensive thing to compute, since that involves checking each provided capability of an IU and determining if it meets a requirement of the category IU.  It would make sense to only do this computation only for the groups/nested categories rather than all IU's.

So we want instead:
Query query = new CompoundQuery(new Query[] {new CompoundQuery(new Query[] {groupQuery, categoryQuery}, false), membersOfCategoryQuery},  true);
Comment 1 Susan McCourt CLA 2008-01-03 11:51:21 EST
fixed in HEAD >20080103.
The example reported was the only one like that.