Bug 482680

Summary: The performance of looking up a command by element ID could be improved.
Product: [Eclipse Project] Platform Reporter: Ed Merks <Ed.Merks>
Component: UIAssignee: Ed Merks <Ed.Merks>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, nobody
Version: 4.6Keywords: noteworthy
Target Milestone: 4.6 M4   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/60898
https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7d084641490d9ab423494a832bc2da6cd2012614
Whiteboard:
Bug Depends on:    
Bug Blocks: 483362    

Description Ed Merks CLA 2015-11-20 07:59:18 EST
There are a number of places where an application's command is looked up by elementID.  In each case it iterates over all commands to find a match. With trace profile measurement, this alone takes 274ms which is 1% of the time between showing the workspace prompt and showing the IDE for a JEE IDE.

This could be improved with a mapped lookup.  I'll provide a patch that maintains a Map in ApplicationImpl and provides API to look up a command by element ID.
Comment 1 Eclipse Genie CLA 2015-11-20 08:00:28 EST
New Gerrit change created: https://git.eclipse.org/r/60898
Comment 2 Ed Merks CLA 2015-11-20 08:01:31 EST
With these changes, the cost of command lookup is reduced to 4ms, a 1% improvement in the time it takes to show the IDE.
Comment 4 Lars Vogel CLA 2015-12-01 10:48:50 EST
Thanks Ed.