I've had some success by tuning the GC with `collectgarbage('setpause', 100)` and then manually calling ` collectgarbage('step')`every once in a while.
That being said this problem isn't unique to Lua, There are horror stories about Unity and their integration of C# for example.
It's especially bad in Unity because it's using the Boehm garbage collector. C# everywhere else has a performant generational GC. Unity have been working on this problem for years now trying to get the engine to work with .NET (Core) and it's better GC.
I've had some success by tuning the GC with `collectgarbage('setpause', 100)` and then manually calling ` collectgarbage('step')`every once in a while.
That being said this problem isn't unique to Lua, There are horror stories about Unity and their integration of C# for example.