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.
Build: NetBeans IDE Dev (Build nbms-and-javadoc-4007-on-090929) VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08 OS: Windows XP, 5.1, x86 User Comments: j0ni: changing project group. velodiver: opening a project GUEST: opening project Maximum slowness yet reported was 9641 ms, average is 5110
Created attachment 88959 [details] nps snapshot
This issue already has 6 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=156866
Do not call CloneableEditor.getEditorPane because it blocks when editor initialization is in progress. NbDocument.findRecentEditorPane(EditorCookie) is non blocking alteranative. Then listen to EditorCookie.Observable.
I tried to implement that (see attachment). I had to use heavy artillery to workaround the slow CES.Pane.getEditorPane while (hopefully) preserving the behavior. Result is less predictable, more difficult to maintain, consumes more memory and is slower (on each invocation, not only if the editor is being initialized) than the original solution with "fast" (i.e. original) getEditorPane() method, but is the only reasonable solution I found so far (I tried several other solutions, but they either do not work, or, in one case, I am afraid of serious functional regressions). So, I would like to request a performance review of this patch. Please also check that the methods I call in AWT thread are OK to be called there (e.g. TopComponent.getLookup().lookup(DataObject.class|FileObject.class|Node.class.getLookup().lookup(DataObject.class, FileObject.class, Node.class.getLookup()..., EditorCookie.Observable.{add|remove}PropertyChangeListener, etc.). Please provide guidance on how to implement the workaround better (ideally by improving the patch), if the current patch is not good enough. The patch also improves two warning messages in openide.text and adds two warnings to CES.Pane.getEditorPane(). Is there a case where the method can be used? If not, I suggest to deprecate the method altogether. Thanks.
Created attachment 89170 [details] Current version of the patch.
Created attachment 89309 [details] Updated version of the patch - fixes a few mistakes
I have attached an updated version of the patch (prevents infinite recursion in DataObject lookup, fixes two other mistakes I found while testing the lazy loading).
Was resolved long time ago, AFAIK.