lua-users home
lua-l archive

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


On Tue, 5 Feb 2002, Martin Stone wrote:

> I'm repeatedly forcing garbage collection every frame (in a game) like this:
>
> 	lua_setgcthreshold(L, 0);
>
> The time taken for this function to complete seems to increase with each call.  In between calls the same lua function is called every frame, generating (presumably) a fixed amount of garbage each time.
>

Maybe the function is also generating some amount of *non* garbage each
time. As this data accumulates, the collector slows down. (It traverses
all live data structures in your program.)

-- Roberto