[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Garbage collection slowdown
- From: Roberto Ierusalimschy <rieru@...>
- Date: Tue, 5 Feb 2002 11:10:25 -0600 (CST)
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