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 117292

Summary: FileBuiltQuery slows down folder expansion
Product: java Reporter: Petr Nejedly <pnejedly>
Component: SourceAssignee: Tomas Zezula <tzezula>
Status: VERIFIED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 114195    

Description Petr Nejedly 2007-10-01 12:47:07 UTC
JavaNode constructor spends most of the time (~1000ms for 120 files in a folder) inside FileBuiltQuery.getStatus()
Status resolution (which is both processing and I/O expensive) should be performed later, once the folder is rendered,
at best.

Note that the threading is not that simple here, there are already few threads involved in folder expand:
FolderRecognizer, which converts FileObjects into DataObjects 
FolderChildren_Refresh, which creates the nodes for the DataObjects (this is where this slowdown happens)
AWT thread which renders the nodes later.

Also note that it _might_ cause some problems to fire a lot of status changes one-by-one, so some testing of this
scenario might be necessary.
Comment 1 Tomas Zezula 2007-10-02 10:26:31 UTC
Checking in org/netbeans/modules/java/JavaNode.java;
/cvs/java/source/src/org/netbeans/modules/java/JavaNode.java,v  <--  JavaNode.java
new revision: 1.12; previous revision: 1.11
done
Comment 2 Petr Nejedly 2007-10-04 16:56:34 UTC
Looks much better now. At least in the JavaNode ctor....