Procedurally creating complex meshes without stutter
I have a scene containing MeshInstance node. This node creates its own mesh data (via ArrayMesh) in _enter_tree() callback. The mesh is complex and takes some time to build.
At some point I need to instantiate a lot of such scenes in a single frame. When I do so, complete execution stutters, waiting for meshes to create themselves. The stutter happens even if I instantiate single such scene but to a lesser degree. So scattering them a bit in time is still not good enough solution.
Is there a way to create meshes asynchronously in the background? I tried launching a low priority builder thread in _enter_tree() callback but the stutter is still there. Any suggestions on how to handle this?