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.
Summary: | Massive performance degeneration with maven project (blocks EDT) | ||
---|---|---|---|
Product: | projects | Reporter: | matthias42 |
Component: | Generic Projects UI | Assignee: | Martin Kozeny <mkozeny> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jtulach, NukemBy |
Priority: | P1 | ||
Version: | 8.0.1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
pom that was being worked on, when problem occured
profiler snapshot 1 profiler snapshot 2 new profiler snapshot showing massive CPU usage in SetMainProject#createSubMenu Another Profiler Result CPU spiking after working on POM |
Description
matthias42
2014-07-17 21:08:47 UTC
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. |