[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [p2-dev] query performance
- From: Thomas Hallgren <thomas@xxxxxxx>
- Date: Fri, 12 Aug 2011 09:33:37 +0200
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:18.104.22.168) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b2 Thunderbird/3.1.11
On 2011-08-12 08:44, Mengxin Zhu wrote:
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?
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.
Could you pls help me understand the testing result?
If you need the test data and code, I'll upload it.
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()