Hi
I did the check with "-verbose:gc" on the TickTockCollision demo and indeed,
the short 'stops' coincide with
the triggered garbage collector (until now, I thought the collision detector
was responsible for that !).
Thanks for the hint !

Question: Is there some way, to switch the GC on and off programmatically ?

If there is, one could activate the GC when rendering wouldn't be (visually)
influenced.
Smooth rendering should be one main goal of Java 3D - without timing the
scene updates!
When Java 3D will be compared to other 3D API's, short 'stops' won't make a
good impression...

J. Winter
[EMAIL PROTECTED]

-----Ursprüngliche Nachricht-----
Von: Doug Gehringer <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Saturday, January 16, 1999 1:12 AM
Betreff: Re: [java3d] has the update frequency of the scene graph a limit ?


>
>
>> From: "Pascal Debarge" <[EMAIL PROTECTED]>
>>
>> I am currently updating the position and the behavior of each
>> character (about 40) 15 times per second.
>> The problem is that the renderer seems to be stucked every 1 or 2
>> seconds during
>> 200 or 300 milliseconds. Even if I reduce the update rate to 1 per
>> second,
>> the problem is the same.
>
>So, if I understand you right, the renderer is displaying frames at a
reasonable
>rate, but every one or two seconds you get a 200-300 millisecond pause?
This
>sounds like the garbage collector is running. Try running java with
>"-verbose:gc" to see if the gc messages coincide with your pauses.
>
>If gc is the culprit, then you can speed things up by reducing your memory
"burn
>rate".  Try to reuse objects instead of creating them with each frame.
Since you
>are modifying transforms with each frame, make sure you re-use the
transforms
>instead of creating new ones.
>
>Early in the Java3D development process the team was able to significantly
>increase frame rates and decrease "jitter" by carefully managing memory.
>
>Also, increasing your initial heap size using the -Xms option can reduce
the
>problem by making the gc have more room to cleanup. Try "-XmsXXXm -XmxXXXm"
>where XXX is the maximum amount of real memory your Java application can
use.
>Note that this doesn't reduce the amount of time spent in GC (unless your
>application is just a bit smaller than the max heap size), but instead
makes
>your do fewer GCs, each of which takes longer.
>
>BTW, how many frames a second are you getting (use
View.getFrameStartTimes() or
>View.getLastFrameDuration() to tell).  It doesn't make much sense to update
the
>scene more often than the renderer can render it.
>
>Doug Gehringer
>Sun Microsystems
>
>=====================================================================
>To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
>Java 3D Home Page: http://java.sun.com/products/java-media/3D/
>



˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to