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 191278 - checking enable on action should not trigger parsing
Summary: checking enable on action should not trigger parsing
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: David Strupl
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2010-10-23 12:02 UTC by lolo_101
Modified: 2011-10-14 12:45 UTC (History)
32 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 173273


Attachments
nps snapshot (10.32 KB, application/nps)
2010-10-23 12:02 UTC, lolo_101
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lolo_101 2010-10-23 12:02:12 UTC
Build: NetBeans IDE 7.0 M2 (Build 201010151251)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03, Java(TM) SE Runtime Environment, 1.6.0_22-b04
OS: Windows 7

User Comments:
GUEST: find usages

GUEST: bringing up contextual menu

GUEST: find usages



Maximum slowness yet reported was 220632 ms, average is 29053
Comment 1 lolo_101 2010-10-23 12:02:20 UTC
Created attachment 102587 [details]
nps snapshot
Comment 2 Tomas Mysik 2011-09-27 06:33:15 UTC
Sorry, 169 duplicates is really a lot. Please, try to look at it.

Thanks.
Comment 3 David Strupl 2011-10-14 08:19:24 UTC
After Dusan fixed #192468 the code in TestMethodAction is IMHO correct.

The new reports look like there is some problem in runWhenScanFinished - it is blocked for 19s when trying to acquire a lock???
Comment 4 Tomas Zezula 2011-10-14 08:33:43 UTC
In reply to comment #3:
Seems that David know something more about this problem, from my point of view the fix of #192468 does not solve the EDT contention with Code Completion thread at all. In fact it has nothing in common with parsing api.
Comment 5 David Strupl 2011-10-14 08:50:15 UTC
I apologize: while looking at
http://statistics.netbeans.org/exceptions/exception.do?id=530074
I have just thought that the problem is not in junit as there it was originally assigned to? Or is the problem in junit TestMethodAction? If so I will re-assign back to Yulia ...
Comment 6 Tomas Zezula 2011-10-14 08:58:21 UTC
To clarify:
"runWhenScanFinished blocking?"
The method behaves exactly according its name, it runs an task when there is not scan in sync otherwise it runs the task in background when the scan is done.

Looking at the snapshot there is no scan and the EDT is in contention with Code Completion thread which does indirectly network operation under the lock and block the EDT.
I looked just on one nps, if all others are caused by the CC thread the best fix is not to do long time operations which does not require lock under the lock.

Also the JUnit action may be in contention with any other lock holder (except of scan) so it's also incorrect.
It's up to you to choose.
Comment 7 David Strupl 2011-10-14 11:43:42 UTC
I will try to do something with the JUnit enable check.
Comment 8 David Strupl 2011-10-14 12:45:56 UTC
http://hg.netbeans.org/jet-main/rev/6b4f3d5aff62