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 172931

Summary: [68cat] AWT thread blocked for 29229 ms.
Product: javaee Reporter: dheffelfinger <dheffelfinger>
Component: ServletAssignee: Denis Anisimov <ads>
Status: RESOLVED FIXED    
Severity: blocker CC: dheffelfinger, mkleint, mmocnak, pjiricka
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=159021
Issue Type: DEFECT Exception Reporter: 159021
Attachments: nps snapshot
nps snapshot

Description dheffelfinger 2009-09-23 19:16:16 UTC
This issue was originally marked as duplicate of issue 171708, 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 200909221401)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments:
dheffelfinger: 29 seconds???


Maximum slowness yet reported was 29229 ms, average is 29229
Comment 1 dheffelfinger 2009-09-23 19:16:22 UTC
Created attachment 88224 [details]
nps snapshot
Comment 2 dheffelfinger 2009-09-25 14:49:05 UTC
Build: NetBeans IDE Dev (Build 200909221401)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments: 

Maximum slowness yet reported was 29229 ms, average is 26442
Comment 3 dheffelfinger 2009-09-25 14:49:09 UTC
Created attachment 88369 [details]
nps snapshot
Comment 4 Petr Jiricka 2009-10-02 16:31:13 UTC
Denis, can you please take a look? You may need to talk to Milos Kleint about the Maven aspect.
Comment 5 Denis Anisimov 2009-10-05 09:08:27 UTC
I cannot identify the original blocking entry here for now.
But problem is in time consuming Java parsing loop.
We cannot fix this performance with Java parsing.
OnePassCompilerWorker takes 9 seconds . This is pure Java compiler code.
Also indexer takes another 9 seconds. This is result of web model annotation listener code.
But no improvements could be done in web module because most of this time takes ElementHandle.resolve()
invocation. This method also belongs to Java compiler. 

Slow Java compiler is the problem here.
Probably this is consequence of big and complicated  project.

This issue could be fixed on our side via avoiding waiting for Java parsing only.
But I need to identify entry which is blocking due this parsing........
Comment 6 Denis Anisimov 2009-10-05 09:21:41 UTC
OK, 
it seems I have found the reason of blocking.
There is UI show popup menu entry which invokes 
WebReplaceTokenProvider.isServletFile by stack trace .
So we have exactly the same problem as here http://www.netbeans.org/issues/show_bug.cgi?id=171708
due code duplication.
It should be resolved by similar way.
Comment 7 Denis Anisimov 2009-10-05 13:42:52 UTC
changeset:   147626:88ba3ce2468f
user:        Denis Anisimov <ads@netbeans.org>
date:        Mon Oct 05 14:43:09 2009 +0400
summary:     Fix for IZ#172931 - [68cat] AWT thread blocked for 29229 ms.
Comment 8 Quality Engineering 2009-10-07 00:17:47 UTC
Integrated into 'main-golden', will be available in build *200910061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/88ba3ce2468f
User: Denis Anisimov <ads@netbeans.org>
Log: Fix for IZ#172931 - [68cat] AWT thread blocked for 29229 ms.