Hello Guest

Garbage Collection

  • 12 Replies
  • 29615 Views
Garbage Collection
« on: January 06, 2005, 15:33:01 »
Hi all

I am currently in the early stages of developing a game using java. I was wondering if anybody out there has had any performance issues with their games due to garbage collections being performed by the VM.

cheers

Garbage Collection
« Reply #1 on: January 06, 2005, 15:57:42 »
None whatsoever. I do occasionally call System.gc() however after loading/reloading a large number of assets, just to make sure it's never a problem.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

*

Offline princec

  • *****
  • 1933
    • Puppygames
Garbage Collection
« Reply #2 on: January 06, 2005, 17:53:44 »
No.

Cas :)

hmmmmm...
« Reply #3 on: January 07, 2005, 14:13:59 »
You do have to make sure that your engine is designed so that garbage collection is reduced to a minimum. My first engine design created a lot of objects and let the GC collect them.  The performace was horrible.  :lol:
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

*

Offline princec

  • *****
  • 1933
    • Puppygames
Garbage Collection
« Reply #4 on: January 07, 2005, 14:59:47 »
Yeah. If you're creating more than 10kb of garbage per frame you'll likely start running into trouble.

Cas :)

hmmmmm...
« Reply #5 on: January 10, 2005, 14:32:23 »
Well, at the chance that I'll sound incompetent there was alot :oops: (and it produced a less steady framerate more than a lower framerate, which to me is just as bad :roll:)
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

*

Offline princec

  • *****
  • 1933
    • Puppygames
Garbage Collection
« Reply #6 on: January 10, 2005, 15:19:43 »
You can actually steady the framerate out fine even with that amount of garbage, just by carefully tuning the GC collection options. The only problem is that you a) can't do it under webstart and b) it's different for 1.4 and 1.5

Cas :)

hmmm...
« Reply #7 on: January 11, 2005, 14:20:43 »
I didn't think of that. :lol: That would have saved me alot of time  :wink:
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

*

Offline blah

  • **
  • 68
Garbage Collection
« Reply #8 on: January 15, 2005, 12:11:01 »
Quote from: "princec"
You can actually steady the framerate out fine even with that amount of garbage, just by carefully tuning the GC collection options. The only problem is that you a) can't do it under webstart and b) it's different for 1.4 and 1.5

Cas :)


I only recently discovered this, whilst making an auto-jnlp-creator, but ... if webstart will honour the tuning settings, you can handle this: it has a built in feature of allowing you to specify multiple JVM's in parallel with *unique* JVM args to each.

Just kick your local Sun rep until they allow "ANY" JVM arg (anything you could type on the command line) as valid in webstart JNLP. There is no reason not to allow this, other than that sun thinks it isn't important. Off the top of myhead, 1.4 still only supports a tiny tiny subset (3 out of 300!) and 5 supports more, but still not the full 300?

*

Offline princec

  • *****
  • 1933
    • Puppygames
Garbage Collection
« Reply #9 on: January 15, 2005, 12:37:22 »
I've given up asking Sun to do anything for Java.
If somebody would fund it I'd write my own Webstart that did everything correctly.

Cas :)

*

Offline blah

  • **
  • 68
Garbage Collection
« Reply #10 on: January 15, 2005, 12:49:44 »
Give me a quote, and if JGF ever makes that much money...

Perhaps some of the donation money could go towards it too.

Total income to date still hasn't broken the $2 barrier yet, LOL, but we'll wait and see what happens when the site goes live...

*

Offline princec

  • *****
  • 1933
    • Puppygames
Garbage Collection
« Reply #11 on: January 15, 2005, 12:51:30 »
Well, you stand to make 50% as an affiliate for all 3 of our games. That should give you a bit of an incentive to hurry up, eh?

Cas :)

Garbage Collection
« Reply #12 on: January 21, 2005, 01:28:55 »
Quote from: "princec"
I've given up asking Sun to do anything for Java.
If somebody would fund it I'd write my own Webstart that did everything correctly.

Cas :)


Smart move. I've given up on even discussing anything related to Java with them.