GC problems with LightState?

Also see: http://www.jmonkeyengine.com/jmeforum/index.php?topic=4187.new#new



It's very easy to recreate, just run TestTerrainPage and profile the garbage collection… for a few seconds I get about 60.000 objects.

I've noticed that too, although in my own tests using lots of lights and lightstates in a scene, the gc was never major collections, always periodic minor collections that did not seem to hurt performance noticeably so it was "back-burnered".  My guess is the auto wrapping into float arrays which we could easily change.  I'll have a look.

I've fixed this issue and it will go into CVS now.  Now it looks like the only GC left is from the profiler and from the building up of the stats string.  :slight_smile: