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 209580 - 10s - by debugger.ui.EditorContextDispatcher$EditorLookupListener.reAttachFileChangeListener
Summary: 10s - by debugger.ui.EditorContextDispatcher$EditorLookupListener.reAttachFil...
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: PERFORMANCE
: 240144 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-14 15:02 UTC by Jesse Glick
Modified: 2014-01-09 14:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 185865


Attachments
nps snapshot (22.52 KB, application/nps)
2012-03-14 15:02 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-03-14 15:02:48 UTC
This bug was originally marked as duplicate of bug 202490, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20120314-df69c2e22bf3)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

User Comments:
jglick: Opened var/log/BaseBuildableProject.dump in editor and tried to scroll it. Has long lines such as "classPath: ...".



Maximum slowness yet reported was 10385 ms, average is 10385
Comment 1 Jesse Glick 2012-03-14 15:02:51 UTC
Created attachment 116734 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2012-03-16 15:27:31 UTC
org.netbeans.spi.debugger.ui.EditorContextDispatcher$EditorLookupListener.reAttachFileChangeListener()	99.96219	10273 ms (100%)	10273 ms	1


calls

org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.removeFileChangeListener()	99.96219	10273 ms (100%)	10273 ms	1


which results in at least four calls to 

org.netbeans.modules.masterfs.filebasedfs.utils.FileInfo.isDirectory()	99.59184	10235 ms (99,6%)	10235 ms	4



I don't think there is much to do about this in filesystems. If the debugger can move all the re-attaching the listener outside of AWT, it would be the simplest solution.
Comment 3 Martin Entlicher 2012-03-26 15:32:20 UTC
It looks unfortunate to me, that computeChildren(true) touches disk.

Add/remove listener is a disk operation now, which is not expected at all.

The fix is going to be dirty. :-(
Comment 4 Martin Entlicher 2012-03-27 09:19:30 UTC
Fixed by changeset:   216610:a5dabbd9e00f
http://hg.netbeans.org/main/rev/a5dabbd9e00f
Comment 5 Jaroslav Havlin 2014-01-09 14:33:33 UTC
*** Bug 240144 has been marked as a duplicate of this bug. ***