lua-users home
lua-l archive

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


> I was thinking about the total number of objects problem. It seems like
> there
> are a few things which could help this. One would be if you could only
> reprocess objects which have changed since the last full run of the GC.

i.e. generational collection.

> If this were simple, I suppose the answer would already exist!

It does, just not implemented in Lua's garbage collector. And of course,
it's not simple. But it does seem that Lua's garbage collector is ripe for
improvement, and for a slight extension of control over it, something like a
call to the garbage collector that says "process at most this many nodes",
so you can roughly control how long it will take. This would need an
incremental garbage collector; using a generational garbage collector would
in addition prevent garbage collection cycles depending on the total number
of objects in the system.

-- 
http://sc3d.org/rrt/ | wit, n.  educated insolence (Aristotle)