paramat wrote:There are 2 noise optimisations that can be done:
1. Don't recreate noise objects in every mapchunk.
2. Use the new noise buffers in 'get perlin map'.
Hybrid Dog wrote:If l use a buffer localized outside the on_generated and a bit map becomes generated but then no more mapgen happens because the players don't load new mapchunks, does the garbage collector remove the buffer because it's unused or does it keep it until shutdown?
local buffer = {}
minetest.register_on_generated(function()
--Stuff
end)
Hybrid Dog wrote:If somewhere it is marked as weak it (e.g. if the buffer table is stored in a weak table) can be collected, can't it?
And how much memory does buffer use?
Users browsing this forum: No registered users and 3 guests