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 181306 - Netbeans becomes extremely slow
Summary: Netbeans becomes extremely slow
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Subversion (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 07:55 UTC by andrey_p
Modified: 2010-03-03 22:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jstack 1 (26.64 KB, text/plain)
2010-02-27 07:55 UTC, andrey_p
Details
jstack 2 (29.24 KB, text/plain)
2010-02-27 07:56 UTC, andrey_p
Details
jstack 3 (29.15 KB, text/plain)
2010-02-27 07:56 UTC, andrey_p
Details
after GoToFile stack 1 (20.05 KB, text/plain)
2010-03-01 09:06 UTC, andrey_p
Details
after GoToFile stack 2 (35.46 KB, text/plain)
2010-03-01 09:07 UTC, andrey_p
Details
after GoToFile stack 3 (18.89 KB, text/plain)
2010-03-01 09:07 UTC, andrey_p
Details
svncache.zip (18.44 KB, application/zip)
2010-03-02 05:14 UTC, andrey_p
Details
~/.netbeans/dev/var/log/messages.log (595.52 KB, text/plain)
2010-03-02 05:16 UTC, andrey_p
Details
messages.log zipped (1.18 MB, application/zip)
2010-03-02 06:19 UTC, andrey_p
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andrey_p 2010-02-27 07:55:54 UTC
Created attachment 94587 [details]
jstack 1

Under some conditions Netbeans becomes extremely slow. It eats up almost all CPU and trashes HDD. Though it does not hang, all commands and key strokes are processed. However it might take 10 seconds to process cursor movement keystroke in editor window with file which has already been parsed and highlighted. 

Maybe it's related to execution of "Select in project" command. In all cases I've met the problem it happened right after execution of this command, regardless of the file which I requested. After problem has happened there is no way to make Netbeans responsive again other than to restart it

I'm attaching couple of jstack dumps. Below is snippet from console Netbeans has been ran from

WARNING [org.netbeans.core.TimableEventQueue]: Still previous controller org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@3154d944
WARNING [org.netbeans.core.TimableEventQueue]: Still previous controller org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@78c16609
WARNING [org.netbeans.core.TimableEventQueue]: Still previous controller org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@555754ac
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@320ed83d
WARNING [org.netbeans.core.TimableEventQueue]: no snapshot taken
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@3f21a7cc
WARNING [org.netbeans.core.TimableEventQueue]: no snapshot taken
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@6cd247cc
WARNING [org.netbeans.core.TimableEventQueue]: no snapshot taken
WARNING [org.netbeans.JarClassLoader]: Opening /Users/ap160621/netbeans/main/nbbuild/netbeans/ide/modules/org-netbeans-spi-editor-hints.jar took 3372 ms
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
Comment 1 andrey_p 2010-02-27 07:56:29 UTC
Created attachment 94588 [details]
jstack 2
Comment 2 andrey_p 2010-02-27 07:56:51 UTC
Created attachment 94589 [details]
jstack 3
Comment 3 andrey_p 2010-02-27 08:02:39 UTC
Trying to exit Netbeans got the following in the console:

WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@4c4899b0
WARNING [org.netbeans.core.TimableEventQueue]: no snapshot taken
SEVERE [org.openide.util.RequestProcessor]
java.lang.OutOfMemoryError: Java heap space
	at org.netbeans.modules.cnd.antlr.InputBuffer.<init>(InputBuffer.java:56)
	at org.netbeans.modules.cnd.antlr.CharBuffer.<init>(CharBuffer.java:32)
	at org.netbeans.modules.cnd.apt.impl.support.generated.APTLexer.<init>(APTLexer.java:307)
	at org.netbeans.modules.cnd.apt.support.APTTokenStreamBuilder.buildTokenStream(APTTokenStreamBuilder.java:80)
	at org.netbeans.modules.cnd.folding.APTFoldingParser.parse(APTFoldingParser.java:112)
	at org.netbeans.modules.cnd.folding.APTFoldingProvider.parse(APTFoldingProvider.java:63)
	at org.netbeans.modules.cnd.editor.parser.CppFile.startParsing(CppFile.java:174)
	at org.netbeans.modules.cnd.editor.parser.CppFile.startParsing(CppFile.java:124)
[catch] at org.netbeans.modules.cnd.editor.folding.CppMetaModel$2.run(CppMetaModel.java:187)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1351)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1889)
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.core.TimableEventQueue]: Still previous controller org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@64eff89f
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread org.netbeans.modules.profiler.actions.SelfSamplerAction$Controller@64eff89f
WARNING [org.netbeans.JarClassLoader]: Opening /Users/ap160621/netbeans/main/nbbuild/netbeans/cnd/modules/org-netbeans-modules-cnd-apt.jar took 3955 ms
WARNING [org.netbeans.core.TimableEventQueue]: no snapshot taken
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
WARNING [org.netbeans.JarClassLoader]: Opening /Users/ap160621/netbeans/main/nbbuild/netbeans/cnd/modules/org-netbeans-modules-cnd.jar took 2692 ms
WARNING [org.netbeans.core.TimableEventQueue]: too much time in AWT thread null
Comment 4 andrey_p 2010-02-27 08:06:50 UTC
Additional info: there are a lot of RAM on my machine, swap is not used, netbeans has been started with -Xmx512m (as per it's own auto-detect procedure in bin/netbeans)
Comment 5 andrey_p 2010-03-01 09:05:45 UTC
The problem might be related to the following: once I'm calling "Go To File" it takes several minutes to find a file (even though console find could do it within 5 seconds). Strangely if I invoke GoToFile window and dismiss it netbeans continues to scan file system. This might take 5-7 minutes (projects cover 1000 to 2000 files in 4-5 subversion controlled working copies)

I'm attaching stack dumps taken after GoToFile windows was dismissed but search not yet stopped
Comment 6 andrey_p 2010-03-01 09:06:39 UTC
Created attachment 94631 [details]
after GoToFile stack 1
Comment 7 andrey_p 2010-03-01 09:07:00 UTC
Created attachment 94632 [details]
after GoToFile stack 2
Comment 8 andrey_p 2010-03-01 09:07:30 UTC
Created attachment 94633 [details]
after GoToFile stack 3
Comment 9 Vladimir Voskresensky 2010-03-01 09:40:29 UTC
From last snapshots it seems Subversion is doing something very slowly may be even unnecessary. 
Please, evaluate
Comment 10 Ondrej Vrabec 2010-03-01 10:28:18 UTC
Please attach the message log (~/.netbeans/version/var/log/message.log) and pack and attach subversion cache folder (~/.netbeans/version/var/cache/svncache)
Comment 11 andrey_p 2010-03-02 05:14:23 UTC
Created attachment 94675 [details]
svncache.zip
Comment 12 andrey_p 2010-03-02 05:16:19 UTC
Created attachment 94676 [details]
~/.netbeans/dev/var/log/messages.log
Comment 13 Ondrej Vrabec 2010-03-02 05:42:54 UTC
Well, the cache doesn't seem to be too huge (it usually slows down IDE when it is) and your build contains latest fixes for subversion, so i don't know what may be wrong in your case. Could you then try few things?
1) delete the subversion cache folder (~/.netbeans/version/var/cache/svncache) and run IDE with -J-Dorg.netbeans.modules.subversion.level=500 and attach the message log when the IDE slows down? With the switch subversion will log some additional messages.

2) after 1) disable the subversion plugin and restart the IDE (so that we're sure it's really subversion's fault). The slowness goes away, right?
Comment 14 andrey_p 2010-03-02 06:19:19 UTC
Created attachment 94680 [details]
messages.log zipped

Strangely I see that subversion support fetches information for the files which are not part of the project but merely located nearby. Frankly there are a lot of them. Also there are 48 working copies of subversion repos there (though as I said project covers only 4-5 of them). This might be the cause
Comment 15 andrey_p 2010-03-02 06:29:04 UTC
For some reason I cannot deactivate subversion plugin. Once I restart IDE it still comes up as Active (though Team plugin which Netbeans deactivated automatically when I requested to deactivate Subversion is not in Active state)
Comment 16 Ondrej Vrabec 2010-03-03 05:52:47 UTC
fix: http://hg.netbeans.org/cdev/rev/a9969dfa46bb
Comment 17 Ondrej Vrabec 2010-03-03 06:00:31 UTC
Hopefully fixed, i'd be glad if you could verify the fix when it's ready and integrated into dev builds.

I removed status refreshing in SubversionVisibilityQuery. Repository updater (parsing/indexing) asks the VisibilityQuery about every folder under all source groups even when they are not displayed (open) in the IDE and we invoked the status refresh on them. Let's hope removing the refresh won't introduce any regression (like that deleted folders would start appearing in IDE).
Comment 18 Quality Engineering 2010-03-03 22:11:04 UTC
Integrated into 'main-golden', will be available in build *201003040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a9969dfa46bb
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #181306 - Netbeans becomes extremely slow