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 177821 - [69cat][68cat] NbToolTip (was: AWT thread blocked for 43109 ms.)
Summary: [69cat][68cat] NbToolTip (was: AWT thread blocked for 43109 ms.)
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: David Strupl
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-11-29 23:20 UTC by Exceptions Reporter
Modified: 2010-10-11 08:39 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 160984


Attachments
nps snapshot (256.00 KB, application/nps)
2009-11-29 23:20 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-11-29 23:20:24 UTC
Build: NetBeans IDE 6.8 Beta (Build 200910212001)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments:
aschild: Applied .diff patch to .js file

dheffelfinger: checking in code into SVN


Maximum slowness yet reported was 43109 ms, average is 20580
Comment 1 Exceptions Reporter 2009-11-29 23:20:29 UTC
Created attachment 91847 [details]
nps snapshot
Comment 2 David Strupl 2010-03-18 16:17:13 UTC
Evaluation: IMHO there is a problem in NbToolTip --- from AWT EDT the method
static synchronized buildToolTip(JTextComponent)
is called. 

1. I don't understand why is that method synchronized. It holds a static class lock and calls into e.g. getMimeType. This can be dangerous (but unrelated to the slowness problem).

2. through buildTip the method
private Annotation[] getTipAnnotations()
is called in AWT EDT. And this can be problematic in cases when the file system calls (e.g. operations on folder and especially ic.instanceCreate() is called on EDT.

I suggest to call getTipAnnotations off the EDT but I don't know enough details to be able to propose a suitable fix.

Returning to the issue to the original gurus.
Comment 3 David Strupl 2010-10-11 08:39:31 UTC
http://hg.netbeans.org/jet-main/rev/067ffed332e5