Reducing GC overhead - 2nd edition

I know I’ve created that other thread about GC and Object allocation of tiny objects, but I really think you guys are working on the wrong problem, it doesn’t seem to be the bottleneck!

Run your app with: -verbose:gc and calculate how much time per second actually is spent cleaning up old objects. Most likely it is in the range of 0.0-0.2ms per second. Running a game for a minute, and find out 360.000 were disposed, means 6 objects per millisecond were collected. That’s just noise-level, performance-wise.

I’m not saying it’s NOT a bottleneck in Xith, I’m saying you should investigate it, before spending hours on something that might only gain you a few FPS, while working on something else would double the framerate.

My $0.02!

I think you are missing the gc issue here. It’s not just gc, it’s complex object recreation… It also only happens as you fly around due to shapes being added and removed from the scene. (try hitting F10 and letting it fly around while you look at garbage collection.) And the goal of the gc cleanup they are doing is not to increase frame rate really, it’s to preserve frame rate over time in situations like bsp where occlusion and such mandates altering the scenegraph often.

Try hitting F10 where and let fly what around?

Link to app, please.

org.xith3d.test.loader.BSPLoaderTest

I really don’t know why, but the GC overhaed seems to have gone (or been reduced to an acceptable level). It must have anything to do with my recent changes. But I don’t know what did the trick. Well… anyway… the Q3 flight won’t hick anymore.

@Amos: Please remeasure.

Marvin

Can you send the sources of your modified vecmath ?

I really think our GC problems are gone. Have you already remeasured? The Q3 flight runs at stable 135 FPS on my system.

Marvin