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

Summary: Icon getter in ClazzDataNode stops AWT thread
Product: java Reporter: Peter Zavadsky <pzavadsky>
Component: UnsupportedAssignee: Pavel Flaska <pflaska>
Status: RESOLVED FIXED    
Severity: blocker Keywords: PERFORMANCE, USABILITY
Priority: P3    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 45449    
Attachments: Stack of AWT when the problem occured

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