Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 177821 - [69cat][68cat] NbToolTip (was: AWT thread blocked for 43109 ms.)
[69cat][68cat] NbToolTip (was: AWT thread blocked for 43109 ms.)
Product: editor
Classification: Unclassified
Component: -- Other --
All All
: P3 (vote)
: 7.0
Assigned To: David Strupl
EXCEPTIONS_REPORT perf-profileme
Depends on:
  Show dependency treegraph
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

nps snapshot (256.00 KB, application/nps)
2009-11-29 23:20 UTC, Exceptions Reporter

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

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