Bug 545385 - Improve evaluation speed of ExpressionMatchQuery
Summary: Improve evaluation speed of ExpressionMatchQuery
Status: NEW
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 4.11   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2019-03-14 03:50 EDT by Karsten Thoms CLA
Modified: 2019-03-14 05:46 EDT (History)
0 users

See Also:


Attachments
Profiler Screenshots (8.09 MB, application/pdf)
2019-03-14 03:52 EDT, Karsten Thoms CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2019-03-14 03:50:22 EDT
The performance of ExpressionMatchQuery#perform() can be improved when the iteration is parallelized by using Spliterator. The performance gain can be observed when the iteration occurs over a high number of elements.

The examined use case is the CBI Aggregator for simrel.aggr and performing the "Validate Aggregation" action. The perform() method is invoked for a collection of 1077 InstallableUnits in that case.

When executing the validation action, ~12s is consumed in ExpressionMatchQuery#perform(). This is called quite frequently and often with larger collections. In the concrete case the method is sometimes called on a collection of 1077 IUs.

I tried to use a Spliterator with parallel execution and this shows a performance gain. The time used in the method is ~1s less. More importantly, this time is spent on multiple threads. The calling method is SimplePlanner#getSolutionFor(), whose execution time drops by 6s from 70s to 64.5s.

The profile shows half of the time is cut off for some methods:
- Unary#evaluate:  8.1s -> 4.1s
- Equals#evaluate: 6.1s -> 3.6s
- Member$DynamicMember#invoke: 5.9s->2.8s
Comment 1 Karsten Thoms CLA 2019-03-14 03:52:44 EDT
Created attachment 277858 [details]
Profiler Screenshots
Comment 2 Eclipse Genie CLA 2019-03-14 05:46:56 EDT
New Gerrit change created: https://git.eclipse.org/r/138718