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.
[ BUILD # : 201206280002 ] [ JDK VERSION : 1.7.5 ] I have a maven based project and worked on it for about an hour. While doing that I switched the git branch externally, ran unit tests and made small edits. I tested the code coverage feature as well. Netbeans was at some point very slow to react and used one of my cores completely. I will attach a short self sampler file to this issue. Memory usage was about 600mb, I got an information that background compilation was disable due to low memory about 10 minutes ealier and clicked on the garbage collect button. I used jvisualvm to diagnose the issue further - the AWT Thread was using nearly most cpu time of all. Perhaps this is a Linux/Nvidia/Gnome/JDK issue instead?
Created attachment 121520 [details] self profiling while netbeans was reacting sluggish
I was experiencing the same problem with Netbeans RC1. It is nearly unusable with response times in the range of 400 ms (scrolling in text!) to 1 second (clicking a button). Attached a new self profile. (I wonder why there is no UI gesture captured, since I scrolled and clicked some stuff)
Created attachment 121583 [details] Sluggishness in RC1
Created attachment 121584 [details] self profiling of 20 seconds showing 13,3 seconds spent in reference handler
Created attachment 121586 [details] Thread dump (rc1)
Created attachment 121587 [details] jvisualvm sampler result (threads)
Created attachment 121588 [details] jvisualvm sampler result (methods)
I managed to get into a usable state again by selecting "code coverage -> clear results". All sluggishness went away, and looking at jvisualvm the RequestProcessor$Processor.run() method stopped eating cpu time. (There was only then an increase in the time when I started interacting with Netbeans again, f.e. scrolling. If I did nothing, the time usage stopped. This was *not* the case previously, even without doing anything one core was completely blocked.) I way to reproduce the CPU usage (but not the sluggishness) is to open a java class after running code coverage, showing the red and green areas which are covered by tests, then clicking "clear" on the button below the editor. After that the requestprocessor starts taking cpu time even when no action in the ide happens. After clicking "done" the cpu usage drops again. I can only speculate that leaving this running for a couple of hours it starts to accumulate.
I am also seeing high CPU usage and experience sluggishness (using NB 7.1.2, in my case) on Linux. Doesn't seem to matter if I run it under JDK 1.7 or 1.6. My project isn't using the code coverage feature.
Can you please post step by step what you did WRT code coverage feature? I mean how did you invoke and on what project etc. Simply step by step I did this this and after that this. Thanks.
Maven based project (can not share it, sorry) - start netbeans, the project is opened automatically. - clean and build (reconfigured to invoke "clean package" phases, thus skipping verify and install) - then right click on the project, select "code coverage -> show report..." The report is opened, shows "no data -- have you run your code yet?" After that the CPU usage is high, but netbeans is still mostly responsive. (I notice that "checking for external changes" is in "suspended" state after that. I assume that netbeans detects the high cpu usage and tries to avoid more load.) CPU usage was still high when the reports view was not the active tab. In this case I could solve the problem by clicking "done" on the reports tab. I will add a self profile with opening the reports view.
Created attachment 121633 [details] Opening code coverage report page leading to high cpu load
The CPU usage is gone when I hit "Run All Tests" on the report page. It reappears after clicking "Clear Results".
It seems that most time is spent in native painting code like sun.java2d.loops.FillRect.FillRect[native] perhaps some optimization is needed in offscreen painting of the code coverage results, especially because there can be many many rows off the screen. The problem seems to lie in generic code coverage support, not in the specific maven instance - reassigning to generic code coverage support.
Still happens in Netbeans 7.3. Steps: - Open maven project - clean and build - rightclick, code coverage, show report - hit button "clear results" Now: High CPU load (on one core) Click on "run all tests" When tests are finished the CPU load is gone.
Can be reproduced with Netbeans 7.3 beta 2 (201211020750) Still only when no code coverage report is available to be shown! For example: Open coverage report, click "clear all results" -> CPU starts to burn cycles. Click "run all tests", when finished the load vanishes. Click on "clear all results", load reappears.
> The problem seems to lie in generic code coverage support, not in the specific maven instance > - reassigning to generic code coverage support. The problem is that contrib/codecoverage category is not on the bug dashboard so this can fall off the radar. maven.coverage module is a part of the standard distribution. So where should it be assigned?
I think this is assigned correctly. We just don't have any maintainer of this module. Any volunteer? :)
I am offering a bounty for the guy who fixes this issue. (Would a beer or grand ice cream do?)
*** Bug 232303 has been marked as a duplicate of this bug. ***
Created attachment 137743 [details] .npss file attached from NetBeans .npss file
Is this hard to fix? (Could someone point out what has to be done in general, so I could look into the code myself or another netcat volunteer?)
Is is fix for this targeted for 8.0.1 ?
Probably fixed by issue #244996. Please verify. *** This bug has been marked as a duplicate of bug 244996 ***