Bug 552712 - [performance] Package explorer context menu slow for big selection
Summary: [performance] Package explorer context menu slow for big selection
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: 4.14 M3   Edit
Assignee: Michael Keppler CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks: 550209
  Show dependency tree
 
Reported: 2019-11-05 15:44 EST by Michael Keppler CLA
Modified: 2019-11-13 03:06 EST (History)
2 users (show)

See Also:


Attachments
profiler screenshot (184.40 KB, image/png)
2019-11-05 15:44 EST, Michael Keppler CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Keppler CLA 2019-11-05 15:44:08 EST
Created attachment 280517 [details]
profiler screenshot

When opening a context menu on a selection containing 200 projects, it takes about 1 second of wallclock time on my machine until the menu is shown.

According to Yourkit, quite some of that time is needed for calculating whether there are property pages available. That calculation is always done for all elements of the selection, even if the union of common property pages is already empty (we should return early, if the result set becomes empty during the iteration).

Afterwards the result set of property page contributors is checked for whether these property pages are actually applicable for multi selection. In most cases, property pages are _not_ applicable for multi selection. Therefore if that check would be done while still iterating the selection, we would have an empty result much earlier, leading to an early exit again.

If I apply those 2 changes, in all my local tests using a platform.ui runtime workspace the property page calculation finishes already during the first iteration of the loop over the multi selection (since all property pages are not applicable for multi selection), thereby increasing the performance drastically.
Comment 1 Eclipse Genie CLA 2019-11-05 15:53:01 EST
New Gerrit change created: https://git.eclipse.org/r/152087
Comment 3 Karsten Thoms CLA 2019-11-11 19:26:25 EST
Is this fixed? If so, please assign yourself, set milestone and resolution.