How important is it to minimize garbage collection in a realtime game on JDK1.5.0/WinXP ?
I have a relatively simple asteroids clone that I wrote in 1999 on JDK1.2 / Win98 that I’m rewriting for an example web release. Back then I ended up retrofitting it so that it would resuse every object that it could to help cut down on garbage collection pauses (it tripled the time between pauses, which was good enough for me then). When I run it now (original code compiled and run on 1.5) on WinXP 3.0GHz P4, I don’t get any gc pauses. (NT back then didn’t have any pauses either). Has garbage collection / Java improved that much that I don’t need to worry about this anymore? I’m asking now before I write too much more because while retrofitting for object reuse isn’t too much of a problem, I wouldn’t like to do it. Most of what I’m writing now is doing about %70 object reuse and I’d definitely be happier if I didn’t have to worry about it too much.
Derek