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 198961

Summary: Build 201104290000 - Sluggish
Product: ide Reporter: aquaglia <aquaglia>
Component: PerformanceAssignee: Tomas Hurka <thurka>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jkovalsky
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows XP   
See Also: http://netbeans.org/bugzilla/show_bug.cgi?id=212479
Issue Type: DEFECT Exception Reporter:

Description aquaglia 2011-05-27 16:48:34 UTC
Quite regularly NetBeans starts being sluggish after some time it has started.

At irregular intervals of a few seconds NB freezes for a couple of seconds and does not accept any interaction.

It looks like there is something done in the background that grabs control of the UI.

It is very unnerving and time consuming.

I have made available the diagnostic files generated using VisualVM at the following locations:

http://dl.dropbox.com/u/4422938/nbsluggish/1306511059110.nps

http://dl.dropbox.com/u/4422938/nbsluggish/application-1306511153143.apps
http://dl.dropbox.com/u/4422938/nbsluggish/application-1306511199442.apps

http://dl.dropbox.com/u/4422938/nbsluggish/heapdump-1306511140456.hprof

http://dl.dropbox.com/u/4422938/nbsluggish/threaddump-1306511135581.tdump

At first I thought it was due to a very high number of unversioned files (several thousands) I had in my open projects but the problem did not disappear after deleting all of them.
Comment 1 aquaglia 2011-06-06 06:40:18 UTC
I have come to think that the issue is caused by Windows running short of file handles.
Comment 2 aquaglia 2011-06-06 14:15:05 UTC
My code was not calling resp.getEntity().consumeContent() (of class org.apache.http.HttpResponse)

Since the code was invoked thousands of times, Win XP ran out of handles (I think) and NB started to be sluggish.
Comment 3 aquaglia 2011-06-06 15:18:27 UTC
However, I am still having the problem from time to time....
Very difficult to nail down, this one.
Comment 4 aquaglia 2011-06-06 15:40:13 UTC
Now I am having the sluggish behaviour.
The only relevant thing is that I have the output window full with a lot of logging information.
I remember this being an issue also with output generated by Tomcat...
Comment 6 Tomas Hurka 2011-06-06 18:42:23 UTC
(In reply to comment #5)
> NetBeans IDE 7.0.1 build #201106020000
> I have uploaded a new set of files.
> http://dl.dropbox.com/u/4422938/nbsluggish/application-1307379340859.apps
There is nothing wrong in the application snapshot you provided. 

> http://dl.dropbox.com/u/4422938/nbsluggish/threaddump-1307379300045.tdump
> http://dl.dropbox.com/u/4422938/nbsluggish/heapdump-1307379305327.hprof
There is no need to attach these separately. Thread dump and heap dump are already part of the application snapshot. If you need to upload heap dump for some reason please upload compressed version.
Comment 7 aquaglia 2011-06-08 16:35:04 UTC
Got sluggish again, here is the snapshot:

http://dl.dropbox.com/u/4422938/nbsluggish/application-1307549436440.apps

If the snapshot is not showing anything, even though the ide IS terribly slow, please tell me how I can collect the information .
Comment 8 Tomas Hurka 2011-06-10 07:22:01 UTC
(In reply to comment #7)
> Got sluggish again, here is the snapshot:
> 
> http://dl.dropbox.com/u/4422938/nbsluggish/application-1307549436440.apps
> 
> If the snapshot is not showing anything, even though the ide IS terribly slow,
> please tell me how I can collect the information .
According to the snapshot, it looks like a lot of time is spend GC. You can see it yourself in the monitoring tab. Heap dump shows a lot of data from the junit tests, Find usages and debugging session. It looks like your junit tests produce a lot of data and this could be a reason that the heap is almost full. I would suggest to increase Xmx to 480M and see if you can reproduce it. If you have a reproducible test case, it would be great to have it.
Comment 9 aquaglia 2011-08-26 20:00:40 UTC
A huge number of files in the Windows temp directory might have been the cause.
Comment 10 aquaglia 2012-07-13 12:19:52 UTC
Probably a duplicate of buf 212479

*** This bug has been marked as a duplicate of bug 212479 ***