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.
Summary: | org.netbeans.modules.xml.multiview.XmlMultiViewElement.getToolbarRepresentation: LowPerformance took 34543 ms. | ||
---|---|---|---|
Product: | xml | Reporter: | gxzero |
Component: | XML Multiview | Assignee: | Svata Dedic <sdedic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mmetelka |
Priority: | P3 | Keywords: | PERFORMANCE |
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 199969 |
Attachments: | nps snapshot |
Description
gxzero
2013-07-09 02:56:54 UTC
Created attachment 136846 [details]
nps snapshot
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 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. 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 |