[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] query performance

On 2011-08-12 08:44, Mengxin Zhu wrote:
Hi Thomas,

I exported all IUs from my customized repository to p2's simple metadata repository that is capable of producing indexes.

Then using the query language to query the same content from new repository, it is much faster than querying the repository without indexes. But the query speed is still much slower than slicer and for-loop.

And the 'traverse' expression is much slower than my original query expression as well. The test result is also published by spreadsheet[1].

Could you pls help me understand the testing result?

If you need the test data and code, I'll upload it.

Please take a look at org.eclipse.equinox.p2.tests.ql.PerformanceTest and the method testPermissiveSlicerPerformance() in particular. The query uses GalileoM7 as input (IIRC it's > 2000 IU's) and the results show that the traverse query is about 10 times faster than the slicer. What is it that you're doing differently in your comparison?

Comparing with a loop is not fair since the traverse query performs an in-depth traversal to find all requirements in the transitive scope extending from the roots. A simple loop would be more comparable to:

$0.collect(iu | iu.requirements.collect(rc | select(iu | iu ~= rc)).flatten()).flatten()

- thomas