You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
internalobject MemoryManager {
/*omitted*/funcleanUp() {
/*omitted*/var begin =Instant.now()
while (ObjectDB.any { it !=null } || nativeCoreTypeMap.isNotEmpty()) { //loops until all objects are cleaned
forceJvmGc() //runs JVM Garbage Collectorif (manageMemory()) { //cleans up to 256 objects
begin =Instant.now()
}
/*omitted*/
}
}
So, to clean up 1000000 nodes, forceJvmGc() will be invoked approximately 4000 times and that takes a long time.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: