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 232413 - org.netbeans.modules.xml.multiview.XmlMultiViewElement.getToolbarRepresentation: LowPerformance took 34543 ms.
Summary: org.netbeans.modules.xml.multiview.XmlMultiViewElement.getToolbarRepresentati...
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: XML Multiview (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2013-07-09 02:56 UTC by gxzero
Modified: 2013-07-16 02:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199969


Attachments
nps snapshot (114.97 KB, application/nps)
2013-07-09 02:56 UTC, gxzero
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gxzero 2013-07-09 02:56:54 UTC
Build: NetBeans IDE 7.3.1 (Build 201306052037)
VM: Java HotSpot(TM) Client VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b17
OS: Windows 7

User Comments:
GUEST: ??netbeans????????

gxzero: I have dojo toolkit in my project. Maybe this is due to the voluminous files contained in the toolkit? "Background scanning of projects" is also stuck.



Maximum slowness yet reported was 34543 ms, average is 28357
Comment 1 gxzero 2013-07-09 02:56:56 UTC
Created attachment 136846 [details]
nps snapshot
Comment 2 Svata Dedic 2013-07-12 12:34:44 UTC
Caused because the toolbar can be created only after the document is loaded. Document load can actually happen in a background thread, but AWT now waits for the load to complete, blocking the UI.

I changed the code so that a placeholder empty JPanel is returned immediately as a toolbar, the document loads in a background thread and when ready, the real toolbar is inserted into the placholder. Subsequent invocations return the real toolbar immediately.

Fixed in http://hg.netbeans.org/jet-main/rev/08e260483d97
Comment 3 Svata Dedic 2013-07-12 12:41:28 UTC
Milo - please consider the pattern for inclusion into CloneableEditor; the same code pattern is found on many different places, all returning CloneableEditor as the visual representation. Implementors could delegate the toolbar creation to either a helper method, or to the CloneableEditor instance (which could remember the instance once created).

Thanks.
Comment 4 Quality Engineering 2013-07-16 02:37:10 UTC
Integrated into 'main-silver', will be available in build *201307152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/08e260483d97
User: Svata Dedic <sdedic@netbeans.org>
Log: #232413: document loading is done in a background thread, then the toolbar is inserted into placeholders