lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Wed, 21 Jun 2006 13:49:01 -0400
"Brian Weed" <> 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:

This way you can control how and when the GC gets done.


Adrian Perez
"Experience is what you get when you don't get what you want"
                                           -- (Dan Stanford)