Bug 2666 - [Navigator] Postpone new wizard sub menu creation for performance? (1GHU7Z2)
Summary: [Navigator] Postpone new wizard sub menu creation for performance? (1GHU7Z2)
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Knut Radloff CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, performance
Depends on:
Blocks:
 
Reported: 2001-10-10 22:41 EDT by Simon Arsenault CLA
Modified: 2002-10-02 17:56 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Arsenault CLA 2001-10-10 22:41:02 EDT
Looking into why the first time the popup menu of the Navigator view is
	opened it takes so long. One area that takes about 1/3 of a second is to
	create the sub menu items of "New" wizard sub menu.

	In NewWizardMenu, we notice the constructor forces fillMenu() to be called
	(there is a comment in there saying this is required...is that still so? why?)
	If we could postpone the creation (i.e calling fillMenu) until the user selects
	it, this would help performance.

	I know we are not filling it just to now if the "New" menu item should be
	enabled because NewWizardMenu::fillMenu will always add New Project...
	and Other... to the sub menu.



NOTES:
Comment 1 DJ Houghton CLA 2001-10-29 19:08:13 EST
PRODUCT VERSION:
	R 0.9

Comment 2 Randy Giffen CLA 2002-05-27 21:41:58 EDT
Defer
Comment 3 Randy Giffen CLA 2002-08-08 15:01:36 EDT
Reopen for investigation
Comment 4 Knut Radloff CLA 2002-10-01 11:18:18 EDT
Looking at the code it says fillMenu is called in the constructor to initialize 
NewWizardMenu fields. fillMenu calls getAction for each new wizard action which 
initializes the actions field.
However, getAction is set up to lazy initialize the action. Calling fillMenu in 
the constructor defeats this mechanism.
The only other side effect of fillMenu/getAction seems to be the creation of 
the actual NewWizardShortcutAction. This sends out property change events when 
the image descriptor and tooltip text is set.
Comment 5 Knut Radloff CLA 2002-10-01 11:36:39 EDT
Commenting out the call to fillMenu does not result in a noticable performance 
gain. Will need to profile, but I suspect that times will be pretty evenly 
spread between the various submenus.
Comment 6 Knut Radloff CLA 2002-10-02 17:56:21 EDT
As Simon reports NewWizardMenu.fillMenu takes about 1/3 of the time. However, 
the total time (as reported by JProbe) is just over 60ms on my office machine. 
Another 1/3 is spent in the Classloader. On my office machine there is no 
noticable lag the first time the popup menu is shown. 
Given that removing the call to fillMenu does not noticably speed up the menu 
opening on my slower home machine I don't think any changes to the menu code 
are justified. Even on my home machine the lag on first opening is definitely 
tolerable.