Hi,
I’ve been tearing my hair out with some very wierd performance problems which I’m currently blaming on the JIT and was hoping was that someone might be able to shine some light on things.
Our Moviestorm application uses JOGL to render fairly complex scenes. We’re using shaders, our character models are pretty rich and there’s a lot of math to handle the animations and kinematics. The net result is that both the GPU and the CPU are pretty busy.
We’ve done various performance improvements recently (with much help from the wonderful NetBeans profiler) but kept coming across runs where the framerates varied wildly: one benchmark is a crowd scene with 20 characters varies from 4fps to 26fps!!
I currently suspect the JIT for several reasons:
() Setting the CompileThreshold really high mostly forces the framerate to be very low
() Choosing -server over -client with the same CompileThreshold gives 26fps vs 22fps
() Choosing JDK6 vs JDK5 gives 26fps vs 24fps
() Long load times frequently seem to result in low framerate
So I’m trying to get a handle on this - for our app we really need to guarantee that the user will see the high framerate - restarting it when it’s stuck in low is not an option.
(1) Is there a limit to how much gets compiled - possibly being consumed by the early load stuff before the real work starts?
(2) Does the JIT compile methods in a queue and wait to avoid stealing too many cycles from the app - resulting in latecomers being denied compilation?
Any other thoughts or suggestions for what we can do?
Thanks,
Dave