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
Apologies if this is a duplicate issue or a known feature of the new engine, I didn't discover anything with the same description in the bug tracker or the noted in the documentation.
I noticed that some code I ported from Godot 3.5 was significantly slower in Godot 4.0 RC 3. I whittled down the issue to the instantiation of a large number of custom defined objects that I was using.
Instantiating 10000 custom objects in Godot 3.5.1 might take around 15 milliseconds. Doing the same thing in Godot 4.0 RC 3 takes over a second on my hardware. The difference seems significant enough to me to wonder if this something that I will need to work around in Godot 4, or if it will be reverted in future.
Steps to reproduce
Writing a script in godot 3.5 that instantiates 10000 objects, custom objects (and for comparison custom resources), out puts some reasonable times:
Godot Engine v3.5.1.stable.official.6fed1ffa3 - https://godotengine.org
OpenGL ES 3.0 Renderer: AMD Radeon RX 6700 XT (navi22, LLVM 15.0.6, DRM 3.47, 5.19.0-32-generic)
Async. shader compilation: OFF
test_10000_objects ran in 784 usecs
test_10000_custom_objects ran in 15344 usecs
test_10000_custom_resources ran in 25674 usecs
Godot version
4.0 RC 34.0 RC 5System information
Ubuntu 22.04.2 LTS, Intel® Core™ i7-8700K CPU @ 3.70GHz × 12, AMD® Radeon rx 6700 xt
Issue description
Apologies if this is a duplicate issue or a known feature of the new engine, I didn't discover anything with the same description in the bug tracker or the noted in the documentation.
I noticed that some code I ported from Godot 3.5 was significantly slower in Godot 4.0 RC 3. I whittled down the issue to the instantiation of a large number of custom defined objects that I was using.
Instantiating 10000 custom objects in Godot 3.5.1 might take around 15 milliseconds. Doing the same thing in Godot 4.0 RC 3 takes over a second on my hardware. The difference seems significant enough to me to wonder if this something that I will need to work around in Godot 4, or if it will be reverted in future.
Steps to reproduce
Writing a script in godot 3.5 that instantiates 10000 objects, custom objects (and for comparison custom resources), out puts some reasonable times:
Godot 3.5.1 Script:
Godot 3.5.1 Output:
Running a similar script in Godot 4.0:
Godot 4.0 Script:
Godot 4.0 RC 5 Output:
Minimal reproduction project
It's probably unnecessary, but I've included small projects that reproduce the issue with both Godot 4.0 RC 3 Forward+ and Compatibility set:
And I've also included a version of (more or less) the same code in Godot 3.5 as a comparison:
The text was updated successfully, but these errors were encountered: