Bug 172525 - AWT thread blocked for a long time when switching project configuration
AWT thread blocked for a long time when switching project configuration
Status: RESOLVED FIXED
Product: projects
Classification: Unclassified
Component: Maven
6.x
All All
: P3 (vote)
: 7.0
Assigned To: Antonin Nebuzelsky
issues@platform
http://statistics.netbeans.org/except...
EXCEPTIONS_REPORT perf-profileme
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-17 21:10 UTC by Exceptions Reporter
Modified: 2010-09-25 02:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
nps snapshot (166.05 KB, bin/nps)
2009-09-17 21:10 UTC, Exceptions Reporter
Details
nps snapshot (256.00 KB, application/nps)
2010-01-07 02:23 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2009-09-17 21:10:33 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-3942-on-090917)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows XP, 5.2, x86
Maximum slowness yet reported was 96265 ms, average is 96265
Comment 1 Exceptions Reporter 2009-09-17 21:10:39 UTC
Created attachment 87887 [details]
nps snapshot
Comment 2 Milan Kubec 2009-09-18 07:27:32 UTC
Time in AWT is spent during saving Maven configuration. Please evaluate.
Comment 3 Exceptions Reporter 2010-01-07 02:23:27 UTC
Created attachment 93110 [details]
nps snapshot

changed project configuration
Comment 4 Antonin Nebuzelsky 2010-07-30 15:17:30 UTC
Reassigning to default owner.
Comment 5 Antonin Nebuzelsky 2010-09-23 12:49:26 UTC
The method ActiveConfigAction.setActiveConfiguration() needs to acquire the mutex on projects to be able to proceed.

In the report from 2009-09-17 the AWT thread is waiting on a mutex for maven's DependencyNode spending time in separate thread in MavenFileOwnerQueryImpl's expensive cache preparation. Similar dependency of the AWT thread on finishing MavenFileOwnerQueryImpl's expensive cache preparation is in the reports from 2010-03-18 and 2010-04-06 where it is triggered in one of the parsing and indexing threads. These three occurrences of the problem should be eliminated in 6.10 by the fix of issue 186024.

In the report from 2010-01-07 the AWT thread is waiting on a mutex for Load Open Projects thread to finish loading projects. The report from 2010-05-21 shows that system is completely overloaded by the many builds running at the same time. Refresh of recent project list which acquired the project mutex is hanging for >15s in a java.io.WinNTFileSystem call.

These last two cases could be eliminated only by scheduling the code in ActiveConfigAction.setActiveConfiguration() (or in actionPerformed methods in ActiveConfigAction) out of AWT thread into a separate thread where waiting for the project mutex would do no harm to UI responsiveness.

Jesse, is this last suggestion possible?
Comment 6 Jesse Glick 2010-09-23 12:56:47 UTC
(In reply to comment #5)
> scheduling the code in
> ActiveConfigAction.setActiveConfiguration() (or in actionPerformed methods in
> ActiveConfigAction) out of AWT thread into a separate thread

Probably would be OK. See also asynch refresh: bug #175348
Comment 7 Antonin Nebuzelsky 2010-09-24 09:28:30 UTC
core-main #86280e21d9a9
Comment 8 Quality Engineering 2010-09-25 02:54:40 UTC
Integrated into 'main-golden', will be available in build *201009250000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/86280e21d9a9
User: Antonin Nebuzelsky <anebuzelsky@netbeans.org>
Log: #172525 - AWT thread blocked for a long time when switching project configuration.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo