lua-users home
lua-l archive

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


> I have about 130 000 userdata objects. The reason for that insane ammout 
> is that I am simulating a big world and many of the C/C++ objects are 
> mirrored on the Lua side as userdata.

Do all these objects have a metatable and/or a __gc metamethod? We were
considering whether it would be worth some optimization to avoid
traversing objects without a metatable/__gc metamethod in function
luaC_separateudata, but that would be useful only for programs that
create lots of userdata without finalizers...

(That change would also create some problems for programs that first
create userdata with no finalizer and later decide to add one...)

-- Roberto