[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: wxLua, and general questions
- From: Robert Anderberg <lua@...>
- Date: Thu, 19 Feb 2004 17:35:20 +0000
On Thursday 19 February 2004 16:24, Christian Vogler wrote:
> > You said if your program stops long enough to collect garbage you could
> > have a perceptible pause. I havent used Lua yet so I dont have any
> > intuition about this. Will my program stop perceptibly to collect
> > garbage?
if there's enough to collect then yes. we ended up calling the garbage
collector every frame in our game to eliminate pauses due to garbage
collection. however a large amount of that could have been eliminated by
better Lua code structure thus eliminating lots of temporary allocations.
> The answer depends very much on what you do, but to provide a datapoint:
> Honestly, I think that Lua GC latencies are of concern only to game
> programmers and other applications subject to realtime constraints.
I agree completely with this. if you're not using Lua in a realtime app then
you really don't need to worry about pauses for garbage collection (and of
course when then new version with incremental garbage collection is complete
you won't have to worry about it at all ;)
The best way to find out if it matters in your particular situation is to do
some tests with realistic amounts of data and see what kind of results you
get.
Rob