hi all

thought i'd share this tip...

i was always annoyed by the stuttering
during the first 30 seconds of my java3d apps.

after experimenting with various command line options
http://java.sun.com/docs/hotspot/VMOptions.html
it seems the pauses are happening whenever the hotspot compiler
compiles bits of code after they have been executed n times
(ie interpreted code is swapped for compiled code)
by default for the client hotspot n=1500

using
-XX:CompileThreshold=5
forces most code to be compiled upfront
this increases startup time & jvm size
but seems to eliminate most of these pauses

i have since come across the undocumented option
-Xcomp
see http://dgarnier.etudier-online.com/java-tricks.html
which forces compilation of all code upfront

so now i generally run most java3d apps
java -Xcomp -Xincgc 3dApp

i've just done some comparisons using 1.4.2
it seems 1.4.2  hotspot is doing the compilation
less intrusively - so the effect of -Xcomp is less noticible

anyway... you might want to experiment for yourself

j

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to