This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 40260 - Tools menu opening is slow (if java node selected)
Summary: Tools menu opening is slow (if java node selected)
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Actions (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: _ rkubacki
URL:
Keywords: PERFORMANCE
Depends on: 39984 45137 58825
Blocks:
  Show dependency tree
 
Reported: 2004-02-19 09:59 UTC by _ rkubacki
Modified: 2008-12-23 14:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2004-02-19 09:59:50 UTC
The menu scans all tools action to check if they
are enabled for active node selection. It means
that especially first opening of tools menu is slow.

                          Linux   Solaris WinXP
NB3.5.1
Tools menu for Java node  162 ms  198 ms  134 ms
dev build (200402171900)
Tools menu for Java node  337 ms  317 ms  344 ms

There is a regression between NB3.5.1 and trunk
builds.
The menu does not scale (each tools action adds
some overhead).
Comment 1 _ ttran 2004-02-25 14:27:58 UTC
Radim will investigate this bug
Comment 2 David Simonek 2004-02-25 17:20:33 UTC
Great! Thx.
Comment 3 _ rkubacki 2004-02-27 16:02:16 UTC
As usually - classloading for all registered tools actions,
significant part of time is taken by accessing files with icons and
getting bundles.

I saw also o.o.awt.Mnemonics.setLocalizedText2 where reflection is use
to get method that is normally available on JDK1.4. 

I will continue w/ investigation
Comment 4 _ rkubacki 2004-03-01 14:09:04 UTC
List of actions in NB3.5.1:
Action #0: org.netbeans.modules.java.ui.actions.SynchronizeAction
Action #1: org.netbeans.modules.java.imptool.ImpToolAction
Action #2: org.netbeans.modules.beans.AddPropertyAction
Action #3: org.netbeans.modules.form.actions.InstallToPaletteAction
Action #4: org.netbeans.modules.javadoc.comments.CorrectJavaDocAction
Action #5: org.netbeans.modules.javadoc.search.ShowDocAction
Action #6: org.netbeans.modules.javadoc.GenerateDocAction
Action #7: org.netbeans.modules.javadoc.comments.AutoCommentAction
Action #8: null
Action #9: org.netbeans.modules.text.ConvertToDefaultAction
Action #10: null
Action #11: org.netbeans.modules.projects.SetMainClassCookieAction
Action #12: org.netbeans.modules.projects.AddToProjectAction
Action #13: null
Action #14: org.netbeans.modules.editor.java.JCUpdateAction
Action #15: null
Action #16: org.netbeans.modules.diff.DiffAction
Action #17: org.netbeans.modules.diff.PatchAction
Action #18: org.netbeans.modules.i18n.I18nGroupPopupAction
Action #19: null
Action #20: org.netbeans.modules.web.core.EditQueryStringAction
Action #21: org.netbeans.modules.web.core.jsploader.ConvertToServletAction
Action #22: org.netbeans.modules.web.context.actions.ConvertToWarAction
Action #23: org.netbeans.modules.web.dd.ConvertTo13SpecAction
Action #24: org.netbeans.modules.web.core.jsploader.ConvertToJavaAction
Action #25: org.netbeans.modules.web.taglib.actions.AddTagLibToRepository

Actions in NB3.6
Action #0: org.netbeans.modules.java.tools.OverrideAction
Action #1: org.netbeans.modules.java.ui.actions.SynchronizeAction
Action #2: org.netbeans.modules.java.imptool.ImpToolAction
Action #3: org.netbeans.modules.javadoc.GenerateDocAction
Action #4: org.netbeans.modules.javadoc.comments.CorrectJavaDocAction
Action #5: org.netbeans.modules.javadoc.comments.AutoCommentAction
Action #6: org.netbeans.modules.javadoc.search.ShowDocAction
Action #7: org.netbeans.modules.form.actions.InstallToPaletteAction
Action #8: org.netbeans.modules.beans.AddPropertyAction
Action #9: null
Action #10: org.netbeans.modules.text.ConvertToDefaultAction
Action #11: null
Action #12: org.netbeans.modules.junit.TestsAction
Action #13: null
Action #14: org.netbeans.modules.diff.DiffAction
Action #15: org.netbeans.modules.diff.PatchAction
Action #16: org.netbeans.modules.i18n.I18nGroupPopupAction
Action #17: null
Action #18: org.netbeans.modules.web.core.jsploader.ConvertToJavaAction
Action #19: org.netbeans.modules.web.context.actions.ConvertToWarAction
Action #20: org.netbeans.modules.web.core.jsploader.ConvertToServletAction
Action #21: org.netbeans.modules.web.core.EditQueryStringAction
Action #22: org.netbeans.modules.web.taglib.actions.AddTagLibToRepository
Action #23: null
Action #24: org.netbeans.modules.editor.java.JCUpdateAction
Action #25: null
Action #26: org.netbeans.modules.projects.SetMainClassCookieAction
Action #27: org.netbeans.modules.projects.AddToProjectAction

It means there are two new actions: o.n.m.java.tools.OverrideAction
and o.n.m.junit.TestsAction and
org.netbeans.modules.web.dd.ConvertTo13SpecAction is missing. The
first one causes scanning of a bundle file that is not read earlier.
Comment 5 Jan Chalupa 2004-03-10 21:30:59 UTC
3.6 waiver approved.
Comment 6 Antonin Nebuzelsky 2004-06-11 18:55:38 UTC
Should be reevaluated for promo-D.
Comment 7 Marian Mirilovic 2004-07-15 13:21:41 UTC
Ok, reevaluation :

for [nb_dev](200407141800), [jdk1.5.0](beta3 - b58) on standard lab
machines:
---------------------

                               RHL9   JDS2   Sol9   W2K   WXP
 Tools main menu for Java node
      1st usage 	297 	243 	319 	219 	302
      Subsequent usage 	76 	74 	120 	56 	60
 
Tools main menu for XML node
      1st usage 	64 	59 	94 	47 	47
      Subsequent usage 	59 	46 	70 	40 	37

Tools main menu for text node
      1st usage 	58 	45 	66 	41 	41
      Subsequent usage 	52 	48 	69 	39 	4
-----------------------------


It means we have still problems with first invocation of Tools main
menu if Java node is selected
Comment 8 _ rkubacki 2004-08-05 15:19:51 UTC
Current results from promo-D build (200408021800, jdk1.5.0beta3) are
pretty similar to those from 3.6 on jdk1.4.2. 

requesting waiver for promo-D as the proper fix requires UI changes
and changes in infrastructure (issue #45137 or other solutions that
will allow more easily extend functionality of foreign object).

The impact is bad UI responsivess for the 1st usage of this menu
mostly in cases when the menu is opened very quickly after start.
Subsequent invocations are done in time that is very close to requied
limit.

No workaround is needed (the action is completed in expected way).

It is assumed that fix of #45137 during promoE will fix this problem
once all the modules are updated.
Comment 9 Petr Jiricka 2004-08-05 16:10:10 UTC
Radime, do you have an updated list of actions for NB 4.0? Thanks.
Comment 10 _ rkubacki 2004-08-05 21:14:20 UTC
We have less actions but results are similar as the most queries used
for enabling/disabling is cached so the first actions pay for computation.

ToolsAction.generate #0, org.netbeans.modules.junit.TestsAction
ToolsAction.generate #1, null
ToolsAction.generate #2, org.netbeans.modules.java.tools.OverrideAction
ToolsAction.generate #3,
org.netbeans.modules.java.ui.actions.SynchronizeAction
ToolsAction.generate #4,
org.netbeans.modules.javadoc.comments.CorrectJavaDocAction
ToolsAction.generate #5,
org.netbeans.modules.javadoc.comments.AutoCommentAction
ToolsAction.generate #6, org.netbeans.modules.javadoc.search.ShowDocAction
ToolsAction.generate #7,
org.netbeans.modules.form.actions.InstallToPaletteAction
ToolsAction.generate #8, null
ToolsAction.generate #9, org.netbeans.modules.favorites.Actions$Add
ToolsAction.generate #10, null
ToolsAction.generate #11, org.netbeans.modules.diff.DiffAction
ToolsAction.generate #12, org.netbeans.modules.diff.PatchAction
ToolsAction.generate #13, org.netbeans.modules.i18n.I18nGroupPopupAction
ToolsAction.generate #14, null
ToolsAction.generate #15,
org.netbeans.modules.web.project.ui.SetExecutionUriAction
ToolsAction.generate #16,
org.netbeans.modules.web.core.EditQueryStringAction
Comment 11 _ rkubacki 2004-08-23 15:03:36 UTC
Assuming it is approved.
Comment 12 _ rkubacki 2005-02-08 13:37:58 UTC
Current state (Feb 8, 2005) is that we are very close or below 100ms
boundary on all platform except Solaris where the first opening takes
150-180 on our test machines. Next invocations are OK. I assume that
we can decrease the priority now.
Comment 13 _ rkubacki 2005-09-29 13:51:52 UTC
Results from 200509281800 build:
Linux FC 3  	JDS 3  	Solaris 9  	Solaris 10  	Win 2000  	Win XP

   Tools main menu for Java node
   [ ms ] / 100 ms 	usage 	94 	74 	102 	124 	20 	N/A
  Tools main menu for XML node
   [ ms ] / 100 ms 	usage 	46 	49 	61 	99 	16 	N/A
  Tools main menu for text node
   [ ms ] / 100 ms 	usage 	43 	35 	58 	63 	21 	N/A

The numbers are similar for other builds. This is mostly a result of
reorganization of a menu and partly also DynaMenuContent can affect this.
Comment 14 Jaromir Uhrik 2006-01-16 15:45:30 UTC
Marking this issue as VERIFIED since the issue reporter == issue owner.
Comment 15 Quality Engineering 2008-12-23 14:26:52 UTC
This issue had *1 votes* before move to platform component