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 149717

Summary: EditorCookie.getDocument() call blocks
Product: platform Reporter: Pavel Flaska <pflaska>
Component: TextAssignee: mslama <mslama>
Status: VERIFIED FIXED    
Severity: blocker CC: jtulach, sustaining
Priority: P2 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Thread-dumps
Test to reproduce the problem openide.text/test/unit/src/org/openide/text/CloneableEditorNeverendingLoadingTest.java

Description Pavel Flaska 2008-10-10 09:14:40 UTC
it is inconsistent with javadoc statement, which says that call does not block. I will attach a thread-dump.
Comment 1 Pavel Flaska 2008-10-10 09:17:18 UTC
Created attachment 71529 [details]
Thread-dumps
Comment 2 Jaroslav Tulach 2008-10-10 14:00:55 UTC
Created attachment 71552 [details]
Test to reproduce the problem openide.text/test/unit/src/org/openide/text/CloneableEditorNeverendingLoadingTest.java
Comment 3 Jaroslav Tulach 2008-10-10 14:05:39 UTC
Here is test showing what makes the startup slower. The test fails in 6.1 and also in current 6.5. I do not think we 
shall change the behaviour for 6.5. However, Marku, please find a fix for this issue for release 7.0, this is highly 
exposed method, called from all over the codebase and we need it to return quite quickly. Its javadoc allows it to 
return null, so let's make it completely non-blocking. People willing to wait can call openDocument() anyway...
Comment 4 Jaroslav Tulach 2008-11-08 19:19:02 UTC
The performance team really needs this fixed. The sooner, the better as after fixing this we may find another 
problematic parts of the IDE that block repaints after start.
Comment 5 mslama 2008-11-24 12:53:05 UTC
core-main #03237310bace
Comment 6 Quality Engineering 2008-11-25 05:09:33 UTC
Integrated into 'main-golden', will be available in build *200811250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/03237310bace
User: Marek Slama <mslama@netbeans.org>
Log: #149717: Do not block CES.getDocument() when document is being loaded.
Comment 7 Pavel Flaska 2008-11-27 10:28:19 UTC
v.
Comment 8 pgebauer 2009-01-12 12:37:49 UTC
The fix has been ported into the release65_fixes repository.

http://hg.netbeans.org/release65_fixes/rev/a5e4f42db526