Closed ImplementsLegend closed 1 month ago
It's a known issue that this part of the code is slow. We plan to replace it following this existing proposal: https://github.com/utopia-rise/godot-kotlin-jvm/issues/508
The direct consequence will be that we won't need to wait for the GC to run when closing Godot anymore.
I am having as well a slow shutdown when closing my game. I am creating a 3d map with a lot of tile-nodes and I am guessing it is this issue.
Should be solved by #661
Simple scenario:
Godot runs absolutely fine, but when you try to close it, it takes forever.
Problem is that
MemoryManager.cleanup()
method invokes garbage collector too much. (at least once for every 256 objects)So, to clean up 1000000 nodes, forceJvmGc() will be invoked approximately 4000 times and that takes a long time.