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 174253

Summary: Invoking Close Project during opening projects blocks AWT
Product: javaee Reporter: Jesse Glick <jglick>
Component: Web ProjectAssignee: David Konecny <dkonecny>
Status: RESOLVED FIXED    
Severity: blocker CC: davti, jis, max_jr, wangcll, wibio
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=159901
Issue Type: DEFECT Exception Reporter: 159901
Attachments: nps snapshot
Thread dump - one Maven project opened (Glassfish) and attempting to close another JavaApplication

Description Jesse Glick 2009-10-09 18:53:00 UTC
This issue was originally marked as duplicate of issue 171690, that is already resolved. This issue is still valid, so this seems to be another issue, but it might be related.

Build: NetBeans IDE Dev (Build 091006)
VM: Java HotSpot(TM) Client VM, 1.5.0_20-b02, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_20-b02
OS: Linux, 2.6.28-15-generic, i386

User Comments:
jglick: Started IDE with several projects open; immediately selected them all and invoked File > Close - IDE hung.


Maximum slowness yet reported was 20582 ms, average is 20582
Comment 1 Jesse Glick 2009-10-09 18:53:06 UTC
Created attachment 89219 [details]
nps snapshot
Comment 2 Milan Kubec 2009-10-12 09:54:22 UTC
Most of the time spent in apisupport, please evaluate. Thanks.
Comment 3 Jiri Sedlacek 2009-10-31 11:13:30 UTC
Just reported http://statistics.netbeans.org/analytics/exception.do?id=291407. Took 28251 ms, this is not a P3 problem -
it makes the user think the IDE is deadlocked and must be restarted.

What about just removing the "Close" action during the initialization if the performance is not easy to/cannot be
improved? The result will be the same as invoking "Close" after initialization except that EDT won't be blocked.
Comment 4 rmichalsky 2009-11-02 13:29:50 UTC
The problem is that closing projects runs in AWT thread and waits for projects to be loaded first in background. Formal
fix would be close projects in background too, but it doesn't really save any user's time - he still needs to wait for
all the projects to be loaded and then to be closed. 

Better would be to really cancel loading projects that weren't loaded yet - don't know how big a change would that be.
Comment 5 Milan Kubec 2009-11-03 15:05:13 UTC
*** Issue 174398 has been marked as a duplicate of this issue. ***
Comment 6 Petr Dvorak 2009-12-01 03:01:43 UTC
Created attachment 91903 [details]
Thread dump - one Maven project opened (Glassfish) and attempting to close another JavaApplication
Comment 7 Jesse Glick 2010-04-13 00:04:45 UTC
At least recent snapshots seem to be about web projects doing a lot of work when opened. Perhaps some of it could be avoided or deferred.
Comment 8 David Konecny 2011-01-11 01:22:02 UTC
No reports since 6.8. Likely fixed.