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 192207

Summary: 5s in ToolbarsListAction.getMenuPresenter() - need non-blocking ToolbarPool.getToolbars()
Product: platform Reporter: nleck <nleck>
Component: Window SystemAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: aldobrucale, alexvsimon, andreyv, apireviews, Chiana, Crerar, ehsaniara, jglick, jjoshi, jocke, joe_h5, jtulach, keichee, mmirilovic, nleck, rmartins, rweaver, saubrecht, Senkler, xylifyx
Priority: P3 Keywords: API_REVIEW_FAST, PERFORMANCE
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 172532
Attachments: nps snapshot
Way to check if toolbar is initialized

Description nleck 2010-11-20 07:24:00 UTC
Build: NetBeans IDE 7.0 Beta (Build 201011152355)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Linux

User Comments:
jocke: activated modules

GUEST: enabling plugins and php and base ide

GUEST: Just open a project made with Netbeans 6.9.1



Maximum slowness yet reported was 8574 ms, average is 5459
Comment 1 nleck 2010-11-20 07:24:05 UTC
Created attachment 103126 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2011-01-27 16:35:16 UTC
Can the 
org.netbeans.core.windows.actions.ToolbarsListAction.getMenuPresenter()
method be rewritten to not call org.openide.awt.ToolbarPool.getToolbars() immediately?

The whole call stack seems to come from a warm-up task soon after start. At this moment nobody needs the actual list of toolbars yet. As such just creating JMenu in ToolbarsListAction.getMenuPresenter() and filling it later (when the ToolbarPool.getToolbars() is already computed) will speed things up.
Comment 3 Stanislav Aubrecht 2011-02-23 11:04:04 UTC
(In reply to comment #2)
> Can the 
> org.netbeans.core.windows.actions.ToolbarsListAction.getMenuPresenter()
> method be rewritten to not call org.openide.awt.ToolbarPool.getToolbars()
> immediately?
sure, go ahead and do it:)
Comment 4 Jaroslav Tulach 2011-02-26 18:17:03 UTC
Well, that is core.windows action. I have other things to do, so if you don't want to bother with it, keep the bug open and assigned to you.
Comment 5 Stanislav Aubrecht 2011-03-03 09:30:17 UTC
(In reply to comment #4)
> Well, that is core.windows action. I have other things to do, so if you don't
> want to bother with it, keep the bug open and assigned to you.

you introduced this bug in changeset http://hg.netbeans.org/main/rev/1482ef3b369d so it's up to you to fix it.
otherwise i'll just rollback that invalid changeset
Comment 6 Jaroslav Tulach 2011-03-03 20:48:44 UTC
Aha. OK, I will try to do something with it then.
Comment 7 Jaroslav Tulach 2011-08-27 17:24:18 UTC
Created attachment 110256 [details]
Way to check if toolbar is initialized
Comment 8 Jaroslav Tulach 2011-09-02 10:02:27 UTC
I guess, I can proceed.
Comment 9 Jesse Glick 2011-09-02 12:15:02 UTC
<summary> in apichanges is wrong.
Comment 10 Quality Engineering 2011-09-03 14:27:25 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/02f13927a115
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #192207: Non-blocking way to obtain list of toolbar configurations
Comment 11 Jaroslav Tulach 2011-09-06 10:08:27 UTC
Summary fixed in 97319d8bb296