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 252149

Summary: org.netbeans.modules.xml.multiview.XmlMultiViewElement.getToolbarRepresentation: LowPerformance took 27998 ms.
Product: platform Reporter: Exceptions Reporter <exceptions_reporter>
Component: TextAssignee: Miloslav Metelka <mmetelka>
Status: NEW ---    
Severity: normal Keywords: PERFORMANCE
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 217010
Attachments: nps snapshot

Description Exceptions Reporter 2015-04-28 23:20:58 UTC
This bug was originally marked as duplicate of bug 232413, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.0 (Build 201403101706)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b70, Java(TM) SE Runtime Environment, 1.8.0-b132
OS: Windows 7

User Comments:
GUEST: eating a lot of memory from my machine compared to other IDE



Maximum slowness yet reported was 27998 ms, average is 27998
Comment 1 Exceptions Reporter 2015-04-28 23:21:01 UTC
Created attachment 153446 [details]
nps snapshot
Comment 2 Svata Dedic 2015-05-06 14:40:04 UTC
The profiler snapshot shows that the Multiview impl. tries to get an editorPanel using CloneableEditor.getEditorPane(), which
a/ MUST be called in AWT thread and
b/ is BLOCKING until the editor initializes offscreen (CloneableEditorInitializer.waitForFinishedInitialization)

I don't need the JEditorPane instance immediately, but the API does not provide a method (or I didn't find it) to find out that the editor pane is being initialized + potentially get notified when the init completes. Since getEditorPane() must be called in AWT, the caller risks UI freeze.
Comment 3 Vladimir Voskresensky 2015-05-06 15:47:49 UTC
(In reply to Svata Dedic from comment #2)
> The profiler snapshot shows that the Multiview impl. tries to get an
> editorPanel using CloneableEditor.getEditorPane(), which
> a/ MUST be called in AWT thread and
> b/ is BLOCKING until the editor initializes offscreen
> (CloneableEditorInitializer.waitForFinishedInitialization)
> 
> I don't need the JEditorPane instance immediately, but the API does not
> provide a method (or I didn't find it) to find out that the editor pane is
> being initialized
Have a look at NbDocument.findRecentEditorPane

> + potentially get notified when the init completes. 
have a look at CsmUtilities.openAtElement