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.
Created attachment 148117 [details] pom that was being worked on, when problem occured After chasing some more after bug 245703, I decided to see if the problem is present in head builds. So I did a build from core-main. Last change according to hg log: Änderung: 276238:8561dfaf6740 Marke: tip Vorgänger: 276225:28273cc589d7 Vorgänger: 276237:22364e3ea611 Nutzer: ffjre@netbeans.org Datum: Thu Jul 17 18:15:10 2014 +0000 Zusammenfassung: Automated merge with main-silver This build proofed to be unusable. I worked on the redminenb plugin (https://github.com/redminenb/redminenb), trying to merge the two modules of the plugin to one. I was working in the pom.xml, added some dependencies in the gui, made some manual adjustmends and the netbeans froze. top showed one cpu core completly saturnated by java, jvisualvm showed netbeans as the problem. The frozen state was explainable when viewing the profiler samples - the AWT event dispatching thread is blocked. I'll attach the pom.xml and two profiler snapshots. P1 reason: Very bad UI responsiveness making the feature unusable
Created attachment 148118 [details] profiler snapshot 1
Created attachment 148119 [details] profiler snapshot 2
introduced in #32dcd20f096c looks like on each call of SetMainProject.createSubMenu() there is a new listener registered on each projectinfo which then triggers on e.g. each pom save Martin, please have a look
Hope this helps: https://hg.netbeans.org/core-main/rev/c01fc4586f73. If problem persists, feel free to reopen.
Looks good - I rebuild netbeans and opened two maven projects, worked in the pom, did some changes and saves. I see spikes in CPU usage after save, but that is expected (I'll asume the internal POM model is rebuild and dependencies are recalculated).
Created attachment 148151 [details] new profiler snapshot showing massive CPU usage in SetMainProject#createSubMenu Reopening - the situation is better but not fixed. I managed to get the GUI frozen and I even managed to fire up visualvm in time. The attached profiler snapshot show the last seconds of the problem. As you can see the EDT is blocked in createSubMenu for a long time. The method looks _very_ expensive to call.
Not connected with bug fix #32dcd20f096c. Fix: https://hg.netbeans.org/core-main/rev/ff7de19f9b07.
Created attachment 148189 [details] Another Profiler Result Sorry - but this does not work - netbeans is once again unsable, all my cores are fully occupied working on the netbeans java process. I attached the last sampler snapshot I got from netbeans here, and will provide a screen shot showing CPU usage. Another comment - your fix moves swing creation/handling outside the EDT - from my understanding of the theory, this is a no-no. From my understanding of the sampler output I would not run after the swing EDT, but have a broader look at the real hotspots (keeping in mind, that I had approx. 3 projects open, the Arrays#sort method is dog slow).
Created attachment 148190 [details] CPU spiking after working on POM
You're right. Recreated as only menu item name update, not creating whole submenu when project name changed. Profiler shows me no performance problems. Fix: https://hg.netbeans.org/core-main/rev/666f0eeaec1d.
*** Bug 245882 has been marked as a duplicate of this bug. ***
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/c01fc4586f73 User: Martin Kozeny <mkozeny@netbeans.org> Log: #245771: Massive performance degeneration with maven project (blocks EDT).
*** Bug 245878 has been marked as a duplicate of this bug. ***
Improved handling with property change listeners: https://hg.netbeans.org/core-main/rev/4d3acde3aa22
Integrated into 'main-silver', will be available in build *201407280405* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/4d3acde3aa22 User: Martin Kozeny <mkozeny@netbeans.org> Log: #245771: Massive performance degeneration with maven project (blocks EDT) - improved handling with property change listeners.