Meshport has a fairly big problem when it comes to trying to export very large areas, such as 500^3 or 1000^3, yes i realize not many users would likely be exporting builds this large but its still a problem ive run into and it could help for making the mod run better
my findings through lots of testing, these were all done with mesh1 at 0,0,0 and mesh2 at +,+,+ for what ever size im testing:
on versions of minetest/luanti compiled with LuaJit, meshport is unable to export areas larger than 500^3, when attempting to it will throw this:
AsyncErr: Lua: Runtime error from mod 'meshport' in callback on_chat_message(): table overflow
while using LuaJit RAM usage for 450^3 caps out at 4.50GiB, and said RAM usage is not cleaned up after finishing, taking ~34 seconds on my machine.
when tested on versions that are compiled without LuaJit 450^3 uses 9GiB of RAM, which only goes down to 6.8GiB after finishing, taking ~90 seconds on my machine, both .obj files are the same after finishing, if your system doesn't have enough RAM for this process the RAM usage will fluctuate, going up till RAM is almost completely full, then going down 1GiB or so and CPU usage also goes down until it goes back up, it will do this until the meshport process is done.
the most extreme case is when attempting to do 1000^3, when attempting this it proceeded to use 40GiB of RAM and ~50GiB of SWAP, in total using 90GB of RAM, the process never finished after leaving it running for 2 days and it said "connection timed out" on a singleplayer world.
the reason why im making this issue is because i tested something and replaced all the code for VManip with getnode(), and i managed to export an entire 2000^3 area in iirc it was 3-4 days of processing and RAM never went higher than ~10GiB, with my somewhat limited knowledge of the mod and how it works im baffled it uses the amount of RAM it does to process areas and would kindly ask for some kind of explanation of weather its the way meshport is using VManip, if its caused by something in minetest, or just caused by VManip just being used in general.
TL;DR
Current version of meshport is highly inefficient with how it currently grabs blocks from the map, causing exponentially increasing amounts of RAM usage when increasing size, and currently physically cant export a 500^3 area on a LuaJit compiled version of minetest without running multiple /meshport commands
Meshport has a fairly big problem when it comes to trying to export very large areas, such as 500^3 or 1000^3, yes i realize not many users would likely be exporting builds this large but its still a problem ive run into and it could help for making the mod run better
my findings through lots of testing, these were all done with mesh1 at 0,0,0 and mesh2 at +,+,+ for what ever size im testing:
on versions of minetest/luanti compiled with LuaJit, meshport is unable to export areas larger than 500^3, when attempting to it will throw this:
AsyncErr: Lua: Runtime error from mod 'meshport' in callback on_chat_message(): table overflowwhile using LuaJit RAM usage for 450^3 caps out at 4.50GiB, and said RAM usage is not cleaned up after finishing, taking ~34 seconds on my machine.
when tested on versions that are compiled without LuaJit 450^3 uses 9GiB of RAM, which only goes down to 6.8GiB after finishing, taking ~90 seconds on my machine, both .obj files are the same after finishing, if your system doesn't have enough RAM for this process the RAM usage will fluctuate, going up till RAM is almost completely full, then going down 1GiB or so and CPU usage also goes down until it goes back up, it will do this until the meshport process is done.
the most extreme case is when attempting to do 1000^3, when attempting this it proceeded to use 40GiB of RAM and ~50GiB of SWAP, in total using 90GB of RAM, the process never finished after leaving it running for 2 days and it said "connection timed out" on a singleplayer world.
the reason why im making this issue is because i tested something and replaced all the code for VManip with getnode(), and i managed to export an entire 2000^3 area in iirc it was 3-4 days of processing and RAM never went higher than ~10GiB, with my somewhat limited knowledge of the mod and how it works im baffled it uses the amount of RAM it does to process areas and would kindly ask for some kind of explanation of weather its the way meshport is using VManip, if its caused by something in minetest, or just caused by VManip just being used in general.
TL;DR
Current version of meshport is highly inefficient with how it currently grabs blocks from the map, causing exponentially increasing amounts of RAM usage when increasing size, and currently physically cant export a 500^3 area on a LuaJit compiled version of minetest without running multiple /meshport commands