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 223180 - 35s in 200 calls to I/O via project.ui.groups.DirectoryGroup
Summary: 35s in 200 calls to I/O via project.ui.groups.DirectoryGroup
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-12-03 14:26 UTC by Alexander Simon
Modified: 2012-12-08 02:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 158741


Attachments
nps snapshot (454.68 KB, application/nps)
2012-12-03 14:26 UTC, Alexander Simon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2012-12-03 14:26:15 UTC
Build: NetBeans IDE Dev (Build 20121203-fd5c87eca253)
VM: Java HotSpot(TM) Client VM, 20.12-b01, Java(TM) SE Runtime Environment, 1.6.0_37-b06
OS: SunOS

User Comments:
GUEST: opening to no project

GUEST: typed new text, auto help was trying to come up

javydreamercsw: Attaching a patch to JIRA issue from IDE (Team>Export Patch)



Maximum slowness yet reported was 35922 ms, average is 11823
Comment 1 Alexander Simon 2012-12-03 14:26:21 UTC
Created attachment 128781 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2012-12-03 19:37:35 UTC
In many report, it is just slow I/O - few calls to disk block for ages. I have no idea what to do with them. But the report 
http://statistics.netbeans.org/exceptions/exception.do?id=633745
is different. Single call to
org.netbeans.modules.project.ui.groups.DirectoryGroup.findProjects()	99.89654	25 783 ms (99,9%)	25 781 ms	1
yields 200 hundred calls to
org.netbeans.modules.project.ui.groups.DirectoryGroup.processFolderChildren()	83.29606	21 499 ms (83,3%)	21 499 ms	200
that is indeed something that can be and should be moved  outside of EDT. Two hundred queries to disk just can't be fast.
Comment 3 Milos Kleint 2012-12-05 12:37:21 UTC
https://hg.netbeans.org/core-main/rev/7d541e5fff16

set main project action executes now in RP, including the prop change events fired and reacted upon in DirectoryGroup.
Additionally since some group related methods are expensive (directory group iterating it's projects), I've added asserts on the usage, possible revealing other troubling spots.
Comment 4 Milos Kleint 2012-12-05 15:39:39 UTC
and https://hg.netbeans.org/core-main/rev/4d0883ce8a42
Comment 5 Quality Engineering 2012-12-06 02:36:03 UTC
Integrated into 'main-golden', will be available in build *201212060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7d541e5fff16
User: Milos Kleint <mkleint@netbeans.org>
Log: #223180 setting of main project to be performed outside of AWT (primarily because prop change event is fired and processed)
Comment 6 Quality Engineering 2012-12-08 02:57:47 UTC
Integrated into 'main-golden', will be available in build *201212080001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4d0883ce8a42
User: Milos Kleint <mkleint@netbeans.org>
Log: #223180 reacting to changes is to be done in awt (reconstruction of submenu)