[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Garbage Collection bottleneck
- From: Adrian Perez <moebius.lists@...>
- Date: Wed, 21 Jun 2006 19:54:19 +0200
On Wed, 21 Jun 2006 13:49:01 -0400
"Brian Weed" <firstname.lastname@example.org> wrote:
> We are using Lua 5.02 in our game engine, and although we had no
> problems on previous projects, the garbage collection now seems to be
> a bottleneck (noticable pause in the main loop when the GC executes).
> The problem stems from my creation of some temporary global variables
> inside each tick of the main loop.
Have you tried increasing the GC threshold? If you do so, you will let
Lua have a bigger amount of "waste" objects in memory without being
collected. (Details: http://www.lua.org/manual/5.0/manual.html#2.9).
This way you can control how and when the GC gets done.
"Experience is what you get when you don't get what you want"
-- (Dan Stanford)