Thanks for the response, Bill. For lack of any better idea, I replaced my
j2sdk1_3_0_02/Java3D_1.2 with j2sdk1_3_1_01/Java3D_1.2.1_03, and the problem
went away! I don't have an explanation, but I'm happy with the way VisAD
runs now. It helped for you to let me know I wasn't missing something in
VisAD, so I could look for the problem elsewhere. Thanks.
Randall W. Simons
Sandia National Laboratories
-----Original Message-----
From: Bill Hibbard [mailto:hibbard@xxxxxxxxxxxxxxxxx]
Sent: Friday, January 18, 2002 6:24 AM
To: Randall W. Simons
Subject: Re: Unnecessary Display Refreshing Hurts Performance?
Hi Randall,
> I noticed that the Earth example in visad/examples continues to use up
> processor time even when the cursor is outside both of its windows. On
> my Sun Ultra 60 I see this by repeatedly doing "ps -ef | grep java" and
> looking at the accumulated time.
>
> Actually, I first noticed this on my real application, which gets slower
> as I add more displayed data. It eventually gets to the point where it
> takes 20 seconds to refresh a window with nothing but a JTable in it. I
> have another Java3D program which doesn't use VisAD, and it doesn't have
> this behavior.
>
> Profiling suggests a lot of time spent in the J3D-Renderer-1 thread in
> Canvas3D.callDisplayList. My question is, is VisAD continually
> refreshing the display even when it hasn't changed? If so, why, and how
> can I make it stop? Or have I misunderstood what's going on?
I ran 'java Earth lowresTerrain.nc' and checked for activity
in DisplayImpl.doAction(), MouseBehaviorJ3D.processStimulus(),
VisADCanvasJ3D.renderField() and VisADCanvasJ3D.postSwap().
They all had zero calls as long as I did not manipulate the
display.
In particular, VisADCanvasJ3D extends Canvas3D and its
renderField() and postSwap() methods are invoked every time
Java3D re-renders the frame. Since they are not called, that
indicates that Java3D is not re-rendering.
Furthermore, I do not observe the general slugishness you
describe.
A year or more ago, VisAD did include a RemoveBehaviorJ3D
that did trigger re-rendering (it was a vestage of a work
around for an early Java3D bug). So make sure you have a
recent VisAD installed.
However, if the J3D-Renderer-1 is consuming unnecessary
cycles under VisAD then we would like to fix that. I searched
the archive of JAVA3D-INTEREST@xxxxxxxxxxxx and couldn't find
anything about this problem. I suggest you post your problem
to that list. See:
http://java.sun.com/products/java-media/3D/index.html
for information about subscribing. If you do find that VisAD
is doing something wrong, please us know so we can fix it.
Thank you,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI 53706
hibbard@xxxxxxxxxxxxxxxxx 608-263-4427 fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html