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 44663 - Icon getter in ClazzDataNode stops AWT thread
Summary: Icon getter in ClazzDataNode stops AWT thread
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords: PERFORMANCE, USABILITY
Depends on:
Blocks: 45449
  Show dependency tree
 
Reported: 2004-06-09 19:28 UTC by Peter Zavadsky
Modified: 2004-09-07 09:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack of AWT when the problem occured (7.37 KB, text/plain)
2004-06-09 19:29 UTC, Peter Zavadsky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Zavadsky 2004-06-09 19:28:30 UTC
Trying to use NB/Rave tree as project... then it
happened when scanning trhu, after restart, there
was no paining done about 10 mins. I did thread
dump and saw the painting was stopped because the
ClazzDataNode.getIcon stops it in order to resolve
the icon. The icon getter shouldn't do that.

Instead of this scenario:

1) give me an icon (in AWT),
2) wait (stopping AWT) I first resolve all the
data (meanwhile running the task in other thread,
leaving user out of the game)
3) here is the icon (in AWT)

could you use this one?:

1) give me an icon (in AWT),
2) here is some default one..retuns immediatelly
(in AWT.. user should be fine to see temporary
some icon without the badges etc)
3) start some task in other thread to resolve the
data (in other thread)
4) when the task is finished.. set the resolved
icon.. which should trigger some change event
(scheduled in AWT) and the interested view will
update it accordingly.

I guess this approach should be used also for
other getters for presentation level only (no AWT
stopping should be done there).

New projects looks really very nice.. hope you
will resolve perf issues soon.
Comment 1 Peter Zavadsky 2004-06-09 19:29:14 UTC
Created attachment 15608 [details]
Stack of AWT when the problem occured
Comment 2 Martin Matula 2004-07-19 16:14:50 UTC
Honzo, please look at this. Also please talk to Tomas Hurka before -
he has some hints on how to implement it. Thanks.
Comment 3 Martin Matula 2004-09-02 14:24:33 UTC
Tomasi, could you please look at this? It is the last issue blocking
issue 45449, which is a TCR from javacore DevRev.
Comment 4 Tomas Hurka 2004-09-06 15:49:12 UTC
Pavel will look at it.
Comment 5 Pavel Flaska 2004-09-07 09:27:56 UTC
Checking in src/org/netbeans/modules/clazz/ClassDataNode.java;runsocks
cvs commit
/cvs/clazz/src/org/netbeans/modules/clazz/ClassDataNode.java,v  <-- 
ClassDataNode.java
new revision: 1.45; previous revision: 1.44
done
Checking in src/org/netbeans/modules/clazz/CompiledDataNode.java;
/cvs/clazz/src/org/netbeans/modules/clazz/CompiledDataNode.java,v  <--
 CompiledDataNode.java
new revision: 1.10; previous revision: 1.9
done