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 - FileBuiltQuery slows down folder expansion
Summary: FileBuiltQuery slows down folder expansion
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: PERFORMANCE
Depends on:
Blocks: 114195
  Show dependency tree
 
Reported: 2007-10-01 12:47 UTC by Petr Nejedly
Modified: 2007-10-04 16:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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....