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 28043

Summary: speed up initialization of Shortcut Wizard
Product: platform Reporter: David Simonek <dsimonek>
Component: -- Other --Assignee: Jiri Rechtacek <jrechtacek>
Severity: blocker CC: dpavlica, mmirilovic
Priority: P4 Keywords: PERFORMANCE, UI
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 27795, 29282    
Attachments: profiler output

Description David Simonek 2002-10-16 10:47:50 UTC
First open takes longer then 1 second, which
violates UI responsiveness rules.
I will cooperate and help with speedup. I'll try
to identify time-consuming places using optimizing
tools, ask you for further information, perhaps I
will attach some patches. See measured numbers here:
Comment 1 Marian Mirilovic 2002-10-16 18:12:27 UTC
I provide "QA measurement", on 
             Solaris 5.8

Steps to measure:
- run IDE with new empty userdir (welcome screen is opened)
- Tools | Keyboard Shortcuts
-> measure last paint event before Shorcut Wizard paint finish M1
- select Shortcuts
-> measure last paint event before Shorcut Wizard paint finish M2

M1 = 3951, 3872, 4325 ms
M2 = 142, 119, 166 ms
Comment 2 David Simonek 2002-10-23 16:51:45 UTC
Created attachment 7753 [details]
profiler output
Comment 3 David Simonek 2002-10-23 18:03:52 UTC
There is one main bottleneck, init of panel which holds actions:
85.05% - 7794 ms - org.netbeans.core.ActionsPanel.<init>()
This time is divided into several main time-consuming subtasks:
19.71% - 1807 ms - org.openide.loaders.InstanceDataObject.instanceClass()
12.66% - 1161 ms -
16.99% - 1557 ms - org.openide.util.RequestProcessor.enqueue()
6.21% - 570 ms - org.netbeans.core.ShortcutsEditor.updateDynamicContent()

Suggestions & issues:
- init of Actions panel should start after dialog first paint, with
"loading" message
- try to break up init task and do only things necessary to show
actions tree to the user
- examine possibility of tree model which will not load all but only
visible actions
- why so long RequestProcessor.enqueue() calls? It's waiting to
acquire lock.
Comment 4 Marian Mirilovic 2002-11-22 15:35:06 UTC
Marian's measurement (time in milliseconds):
 - SUN UltraSparc60 / 512 MB RAM / Solaris 5.8 / CDE
 - JDK1.4.1(01)
 - [nb_dev](200211140100) , MDI
        - mounted sampledir

Open Shortcuts wizard	3379	1282	1019

Shortcut Wizard is mesaured by QA test infrastructure on daily builds.

Test cases described on page :
Comment 5 David Simonek 2002-12-06 14:59:58 UTC
passing to Jiri, please update subcomp to dialogs once it is
available. Thx.
Comment 6 David Simonek 2003-01-09 10:40:08 UTC
Adding UI keyword, ccing UI guys. Ideally we would need UI of this
dialog such that it doesn't need to load all actions immediatelly.
Loading of all actions is unfortunately time consuming and we don't
know how to speedup it now.
Suggestions for UI - show some "preparing actions" text? Or show
actions incrementally? Only first few actions, then the rest?
Comment 7 dpavlica 2003-02-07 16:08:13 UTC
There are these two ways:
1. Action could be shown incrementally, BUT in right final 
order and without scrolling automatically.
2. In a case that isn't possible to deliver on conditions 
in 1., then text "preparing actions" is possible solution.

3. Icons could appear subsequently after text of actions.
Comment 8 _ rkubacki 2004-11-23 16:47:46 UTC
This is a defect since it does not meet the criteria.

Current numbers from automated tests running on build 200411221810:
JDS 1056, Solaris 1180, W2K 713, WinXP 906

It means it is OK on WinOSes and we are close on Linux and Solaris.
Comment 9 Jiri Rechtacek 2005-02-03 15:22:59 UTC
On my configuration (LinuxRH9/2GHz) the first open takes 750ms, on
Windows takes about 700ms. Solaris and JDS are near to boundary.
Closed as WONTFIX.
Comment 10 _ rkubacki 2005-02-04 16:51:46 UTC
Note that your notebook is definitely faster than minimum config for
NetBeans ;-)

Anyway we have only problem with first open on Linux and Solaris.
Given that whole dialog is ugly and needs redesign it is not worth the
effort to optimize it.