-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Very slow project/editor opening in Godot 4 #43351
Comments
I haven't grokked numbers specifically but I can confirm qualitatively that starting debug builds of Godot
|
50% of the time seems to be spent compiling shaders. I guess this will improve once shader caching has been implemented, so only the first run will be so slow. |
Caching would be great, but the shader compilation itself should be optimized too. An 8 second startup time is embarrassing, especially for new users. (Also, can we get high priority label) |
The
I prefer reserving that label to issues that impact the current stable release only. It's not like that label makes much of a difference anyway. |
I think the slow start impacts contribution. From my perspective, now I don't check whether the bug is reproducible on It's also a pain to submit PRs, because one have to target |
Use this command to create a new project in a temporary folder, bypassing the project manager: # Assuming you're in the root folder of a Godot Git clone:
mkdir -p /tmp/a
touch /tmp/a/project.godot
bin/godot.x11.tools.64 /tmp/a/project.godot This works with any Godot version. You can save a script like this one in your |
I ran a profiler with #49050 merged locally. The project manager was opened with the Project manager with no projects in the listLinux perf file (can be extracted and opened in HotSpot): perf.data.zip Top-down with cycle-intensive methods unfoldedFlame graphCaller/calleeWith a few dozen projects in the project listLinux perf file (can be extracted and opened in HotSpot): perf.data.zip Top-down with cycle-intensive methods unfoldedFlame graphIt looks like mbedTLS of all things is causing the slowness, which is surprising at first. cc @Faless |
Does it also happen in I mean, the certificate list is big, but shouldn't take millis anyway. Does it get better if you set |
#48978 (comment) shows the same for That would likely best be tracked in a separate issue for 3.x + 4.0. |
Good catch! I'll investigate. |
How is this faring? Since shader caching and stringname optimizations were implemented, I have not seen update to these comparisons. |
I ran a profile on commit b5e5eed ( Linux perf file (can be extracted and opened in HotSpot): perf.data.zip |
With b5e5eed and |
The start-up time is still painfully slow, even on an empty project. |
@nathanfranke Can you compare optimized editor builds of Here, We can improve startup time in both |
There is a slight increase in start-up time for 4.0 optimized compared to 3.x optimized, but it looks like the main regression is the debug (unoptimized) start-up times. 3.4 tests done on v3.4.beta.custom_build [8d0b2ed]
* Time is aggregated from these steps: Load Main Menu, Load Main Scene, Wait 3 Frames, Exit Game. |
@nathanfranke Are those timings for an empty project? I have a feeling the performance has regressed more for complex projects. |
Empty project. Is there a good project to test this on that has 3 and 4 versions? |
@nathanfranke maybe the TPS demo? |
TPS Demo does not work on |
Fixes engine startup time regression described here: godotengine#43351 (comment)
Fixes engine startup time regression described here: #43351 (comment) (cherry picked from commit 52a535c)
Fixes engine startup time regression described here: godotengine#43351 (comment) (cherry picked from commit 52a535c)
Fixes engine startup time regression described here: godotengine#43351 (comment) (cherry picked from commit 52a535c)
2022-06-21.16-35-10_.mp4 |
Fixes engine startup time regression described here: godotengine#43351 (comment) (cherry picked from commit 52a535c)
Pointing out something I noticed the past few days... When I run my project standalone (e.g. Edit: Reported at #63419 |
Not sure if I should be putting this here or in #62322 but if I'm understanding this correctly and used the Instruments software properly (I really don't know what I'm doing) it looks like it's just doing a whole lot of nothing. |
I am on Iris Xe and I experience slowdowns when opening Godot and when running the project and when opening project or editor settings but only on multi-window. If I switch back to single window it's much better but still not as snappy as Godot 3 used to be. |
I am having this same issue, and switching to single window also helps with performance one my end. I am running NixOS on a 11th Gen Intel chip, specifically the Framework laptop. |
Godot version:
4.0.dev.custom_build. 494bf38
GLES 2 - tested 14.01.2020
OS/device including version:
Ubuntu 20.04
Nvidia 970 440.83, i7 4770 4/8
Hotspot -v1.3.0-27-g61f1314
Issue description:
Opening and closing empty project in editor with command
godot -e -q
take a lot of more time than previous versions.2020 11 results
RESULTS FROM 06.11.2020
25.07.2020 results
RESULTS FROM 25.07.2020 |Version|Opening Time| |-|-| |Godot 3.4 (6d58ea6)| 5.2s | |Godot 3.4 (6d58ea6) + Sanitizers| 13.7s | |Godot 4.0 (b918c4c) - first run | 13.9s | |Godot 4.0 (b918c4c) - second run | 10.4s | |Godot 4.0 (b918c4c) + Sanitizers - first run| 53,4s | |Godot 4.0 (b918c4c) + Sanitizers - second run| 33s |RESULTS FROM 28.11.2022 - opening and closing empty project in editor
Dev debug builds
optimized builds(downloaded from official site)
This makes it very difficult to test and develop the engine, especially when you start it with Address Sanitizer for example.
Most time spends on compiling shaders, which seems for me that partially can be avoidable by caching it or even compiling it when compiling Godot(not sure if this is possible).
Running Valgrind in one small project take almost 10 minutes
2020 11 results
CPU Cycles in Godot 3.2
CPU Cycles in Godot 4.0
CPU Cycles in Godot 4.0 GLES 2
Godot 4 Beta 6 Dev Vulkan
Godot 3.6 - 6d58ea6 GLES 3
Steps to reproduce:
To get perf data just execute this command(path must be changed)
And then open it in latest version of Hotspot- https://github.com/KDAB/hotspot/releases
The text was updated successfully, but these errors were encountered: