Original Post
I'm playing around with Ruby and trying to see if it's viable to make small games with. A pretty major issue I've run into is that the garbage collection runs about once a second and causes a severe pause. I've confirmed that it's the GC because the stutter goes away if I disable it.
I was thinking I could manually enable/disable the GC so that it would only run occasionally, but I'm guessing that just means really long pauses occasionally rather than short ones frequently.
Are there any ways to optimize so that collection is less frequent other than allocating less objects? I don't think I can do much less allocating than I already am.
Also, is this particularly bad in Ruby or is it noticeably bad in all garbage collected languages?
I was thinking I could manually enable/disable the GC so that it would only run occasionally, but I'm guessing that just means really long pauses occasionally rather than short ones frequently.
Are there any ways to optimize so that collection is less frequent other than allocating less objects? I don't think I can do much less allocating than I already am.
Also, is this particularly bad in Ruby or is it noticeably bad in all garbage collected languages?