[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] Queries and p2 UI performance
- From: Thomas Hallgren <thomas@xxxxxxx>
- Date: Sat, 07 Jan 2012 22:24:56 +0100
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:22.214.171.124) Gecko/20110928 Fedora/3.1.15-1.fc14 Lightning/1.0b2 Thunderbird/3.1.15
I'll have a look after the weekend.
On 2012-01-07 00:31, Ian Bull wrote:
If you've ever tried to use the p2 UI for a large repository, you will notice it's terribly slow (when search /
expanding, etc...). Turns out the bottleneck is actually expanding the categories. This is because an 'exists' query
is used to find all the IUs that satisfy the requirements of the category (all IUs that 'exist' in this category). It
turns out that we don't actually use the index (capabilityIndex) in this case, so for each element in each category we
check each IU.
The reason we don't use the index is because of how the query is formed. It's not actually a 'capability query' but
rather an 'exists query' that asks which IU satisfies a particular required capability. The index doesn't know what
this means, so it's not used.
I've managed to work on a solution to this, however it's a little hacky. Basically we need to try to inspect the
query to see if it's really a capability query under the covers. If it is, then we need to inspect the query to find
the 'name' of the requirement and use that in our index.
I'm certainly not a p2ql expert, so I wonder if Thomas Hallgren can take a look at my patch?
R. Ian Bull | EclipseSource Victoria | +1 250 477 7484
http://eclipsesource.com | http://twitter.com/eclipsesource