Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 176652 - AWT thread blocked for 7584 ms.
AWT thread blocked for 7584 ms.
Status: VERIFIED DUPLICATE of bug 137829
Product: platform
Classification: Unclassified
Component: Quick Search
All All
: P3 (vote)
: 6.x
Assigned To: David Simonek
EXCEPTIONS_REPORT perf-profileme
Depends on:
  Show dependency treegraph
Reported: 2009-11-12 04:47 UTC by onmomo
Modified: 2009-11-13 04:45 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

nps snapshot (256.00 KB, application/nps)
2009-11-12 04:47 UTC, onmomo

Note You need to log in before you can comment on or make changes to this bug.
Description onmomo 2009-11-12 04:47:45 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-4251-on-091107)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows Vista, 6.0, x86

User Comments:
GUEST: Opening projects during startup takes forever.

GUEST: SVN update

krezelokdaniel: I put the curosor in Search text field and choose item from proposal.

GUEST: Types ctrl-shift-I

onmomo: Pressed Ctrl+ I in the quicksearch box

Maximum slowness yet reported was 14923 ms, average is 7569
Comment 1 onmomo 2009-11-12 04:47:49 UTC
Created attachment 90892 [details]
nps snapshot
Comment 2 Exceptions Reporter 2009-11-12 04:47:55 UTC
This issue already has 11 duplicates 
Comment 3 Jiri Skrivanek 2009-11-12 05:49:24 UTC
Time spent in class loading. Cannot fix in filesystems.
Comment 4 Exceptions Reporter 2009-11-12 16:38:26 UTC
This issue already has 12 duplicates 
Comment 5 Jaroslav Tulach 2009-11-13 00:53:16 UTC seems to indicate problem in quicksearch. It shall probably query the mimelookup in other than AWT thread. is similar.

So is

Reassigning to quicksearch.
Comment 6 David Simonek 2009-11-13 01:57:28 UTC
Well, I knew that this slowness report will come, I just wandered why it took so long? I thought that nobody is using QuickSearch and I'm happy that this is not the case.
To the problem: Actions must be loaded in AWT thread, they fail and throw assertions otherwise. As a result, first usage of Quick Search blocks EQ thread for several seconds. Some API to retrieve action names outside EQ is needed, until that this issue is not fixable. Problem is already tracked in 137829.

*** This bug has been marked as a duplicate of bug 137829 ***
Comment 7 Jaroslav Tulach 2009-11-13 04:45:38 UTC
I am glad you are glad.

1. Actions instances in NetBeans can be created outside of AWT thread. MenuBar and Toolbar supports do it, so at least for those actions it is guaranteed to work. Btw. why it should not? Action is just an interface, its instantiation does not need to call the UIManager, L&F, or obtain AWT tree lock.

2. Just calls to action.getValue and other methods need to happen on AWT thread.

3. Even if you wanted to instantiate actions in AWT, you could still split this task into many small and fast runnables interlaced with showing the progress or letting user to cancel the operation.

Of course the other solution is to convert more actions into declarative ones. If you can identify the slowest, please reassign the bug to appropriate module authors.

Btw. the exception reporter may attempt to reopen or increase priority of bugs that continue appearing automatically.

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