Bug 61899 - [Commands] performance: Investigate start-up performance for commands
Summary: [Commands] performance: Investigate start-up performance for commands
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Douglas Pollock CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-05-12 10:17 EDT by Tod Creasey CLA
Modified: 2005-03-31 11:38 EST (History)
5 users (show)

See Also:


Attachments
Html stack trace (37.13 KB, text/html)
2004-05-12 10:18 EDT, Tod Creasey CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2004-05-12 10:17:35 EDT
I will attach a stack trace of the startup time of the commands support. Note 
that it is likely not actually this bad as the profiler causes some 
performance degredation.

I started a workbench with platform-ui loaded from HEAD with no editors open 
and only the resource perspective (default settings) open.
Comment 1 Tod Creasey CLA 2004-05-12 10:18:31 EDT
Created attachment 10537 [details]
Html stack trace
Comment 2 Michael Van Meekeren CLA 2004-06-14 13:25:51 EDT
Doug, I would like to close this if we can claim improvement and that the 
current support is good. 

Kevin offered to get some performance numbers, adding him to the CC
Comment 3 Douglas Pollock CLA 2004-06-14 14:47:36 EDT
No work has been done on this bug, to my knowledge.  Pascal said he would look 
a bit at ways of improving this, but I believe (last I heard) that the results 
were somewhat inconclusive. 
Comment 4 Pascal Rapicault CLA 2004-06-14 15:00:53 EDT
The only thing I've done, with Doug's help, was to turn off the update of the 
command registry on startup. Unfortunately this did not provide an improvement 
that worth it because still the registry is read and the zillions of objects 
created.
Comment 5 Kevin Haaland CLA 2004-06-15 04:45:10 EDT
Summary for this defect report is misleading. (Only under profiler did command 
startup ever take 3 seconds).

On my thinkpad setting up the commands took a few hundred milliseconds. (aprox 
300)

Looking into this code there are definite opportunities for improving the 
performance.(like using core's optimizatios of caching the registry derived 
data and avoiding re-reading the registry if the eclipse install has not 
changed. Removing this time would save about 1/3 of the time to setup commands 
and would scale better. 
Comment 6 Douglas Pollock CLA 2004-06-15 09:53:39 EDT
On Kevin's recommendation, this is being deferred from 3.0. 
Comment 7 Kevin Haaland CLA 2004-06-15 10:00:20 EDT
+1 (but bumping priority so it does not get lost when we start 3.1 work)
Comment 8 Douglas Pollock CLA 2005-02-22 23:09:26 EST
John: This the start-up performance bug I was speaking about.
Comment 9 Douglas Pollock CLA 2005-02-28 11:01:31 EST
I have made improvements in this area related to the size of objects created and
the number of events fired.

Still to consider is the possibility of serializing the state on shutdown,
rather than going through the registry each time.
Comment 10 Tod Creasey CLA 2005-03-07 11:57:20 EST
Adding my name to the cc list as we are now tracking performance issues more
closely. Please remove the performance keyword if this is not a performance bug.
Comment 11 John Arthorne CLA 2005-03-18 11:34:12 EST
My recent profiling of startup has not found any significant bottleneck in
commands initialization - I think your elimination of those unnecessary events
has made a big difference.  I think you can close this - I'll be sure to open a
new bug if I find any more problems ;)
Comment 12 Douglas Pollock CLA 2005-03-18 11:40:25 EST
Never one to turn down an offer to close bugs....  Thanks for all your help with
this John....
Comment 13 Tod Creasey CLA 2005-03-31 11:17:12 EST
Doug can you give me some stats that I can post on our performance page please
(i.e. percent space or time improvements)?
Comment 14 John Arthorne CLA 2005-03-31 11:38:33 EST
I don't know if this is an apples to apples comparison because the code has
changed so much.  I tried the same test case (platform-ui from HEAD, resource
perspective, no editors open).  WorkbenchCommandSupport.<init> now takes 0.33%
of total startup time, while it shows 9.89% of startup in the trace attached to
this bug. However, the trace shows most of the time in reading the command
registry from disk.  This now appears to happen in
BindingService.readRegistryAndPreferences, which takes 2.3% of total startup
time in I20050331.  My reading is that total impact on startup time is probably
about 5-7%, between the original trace (roughly 3.0), and 3.1 M6.