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 176481 - AWT thread blocked for 11660 ms.
Summary: AWT thread blocked for 11660 ms.
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-11-11 01:14 UTC by aschild
Modified: 2010-10-28 02:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 161789


Attachments
nps snapshot (256.00 KB, application/nps)
2009-11-11 01:14 UTC, aschild
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aschild 2009-11-11 01:14:11 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 200911091156)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows 7, 6.1, x86

User Comments:
aschild: Listing all RESTful Web Services in the project overview


Maximum slowness yet reported was 11660 ms, average is 11660
Comment 1 aschild 2009-11-11 01:14:15 UTC
Created attachment 90767 [details]
nps snapshot
Comment 2 Jan Lahoda 2009-12-16 04:33:37 UTC
RestServicesChildren.createNodes() is called from AWT, and (indirectly) touches the Java infrastructure. I guess that the nodes should be created on background, showing a wait cursor.
Comment 3 Denis Anisimov 2010-10-25 12:36:30 UTC
Instead of usage RestServicesChildren as Children.Keys one need to realize
children via ChildFactory.
Comment 4 Denis Anisimov 2010-10-26 14:11:29 UTC
Current implementation of RestServicesChildren class tries to implement 
functionality which can be done via usage of Children.create() and 
ChildFactory implementation.

The current implementation puts keys initialization into dedicated thread.
As result createNodes() method should not spend too much time in AWT because 
Rest Service model is already initialized . As result any further access to 
this model ( after its initialization ) is not so time consuming.
And method createNodes() is not a problem here.

The problem is inside method addNotify() which could start model initialization
( method getModel() could be the problem because it is based on Java infrastructure ).

So I suggest to put all Rest Service model access into asynchronous call 
which can be done inside createKeys() method of  ChildFactory implementation 
class.
Comment 5 Denis Anisimov 2010-10-27 07:20:38 UTC
changeset:   180417:622f558f42b7
user:        Denis Anisimov <ads@netbeans.org>
date:        Wed Oct 27 11:17:24 2010 +0400
summary:     Fix for BZ#176481 -  AWT thread blocked for 11660 ms.
Comment 6 Quality Engineering 2010-10-28 02:55:36 UTC
Integrated into 'main-golden', will be available in build *201010280000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/622f558f42b7
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for BZ#176481 -  AWT thread blocked for 11660 ms.