godot
godot copied to clipboard
Godot 4 - Freezes for 20-60 seconds
Godot version
4.0
System information
Windows 10.
Issue description
Godot 3.x worked completely fine and well. Now, whenever I launch a project in the editor it freezes for 20-60 seconds at a time. And then when I want to test my game I have to wait another 20-60 seconds before the game even loads.
Steps to reproduce
No clue if reproduceable.
Minimal reproduction project
Freezie Freeze.zip Idk if this will reproduce the same results.
Does it randomly freeze or just on start?
Does it randomly freeze or just on start?
What do you mean randomly?
Does it freeze on start or now and then?
just on start when opening a game in editor and freezes when i try to run a game through the editor
What CPU and graphics card model do you have? Do you have any specific USB peripherals connected?
A slower startup is expected on the initial shaders to allow for shaders to cache. This shouldn't occur on subsequent starts of the editor or a given project though, as Godot will load the cached shaders instead of regenerating them. (Note that switching graphics cards or updating your graphics drivers will invalidate this cache.)
I'm running a surface pro with 16gb ddr4, intel i5-1135G7, no GPU because it's a surface pro, no USB peripherals connected.
I also have this issue on a Surface Pro 8 (i7-1185G7 / Iris Xe) Windows 11 with no USB peripherals connected.
4.0 RC6 works fine, loading and running a project is near instantaneous. 4.0 Stable and 4.0.1 RC take ~15s to open then another 15s to run even a newly created blank project.
Edit:
Just to add to this, it only seems to be a problem with Forward+, Mobile and Compatibility work as expected.
I've compared the verbose logging output for both 4.0 RC6 and 4.0.1 RC1 and in 4.0.1 RC1 it is much slower to output each of the shader lines. So I think it must be ignoring the shader cache each time it's run.
In the project settings the shader cache is enabled.
Same issue here, I have a GTX 1650 and an Intel Core i5-10400f with 32gb ram. Not sure if this is important but I have Godot installed on an HDD but Windows on an SSD.
I can't reproduce this on 4.0.stable (Linux, GeForce RTX 4090 with NVIDIA 525.89.02). This is likely Windows-specific.
Seems to also happen on my pretty high end pc...
I've been experiencing similar issues on my Windows 11 PC. It's sporadic- sometimes the editor launches extremely slowly, sometimes it doesn't. I do suspect shaders to be the culprit here.
However, after a particularly bad bout of performance issues, I checked my project directory and found a scene file containing a single Label that was over 100MB in size. Later, I found two more that were over half a gigabyte in size. Before I could open an issue, the project crashed and the files went back to normal.
I suspect the culprit was related to FontVariations, because I haven't ran into the issue since I stopped using them. This may be unrelated, but check your project directory for any unusually massive files whenever you experience these issues during runtime
Slow launch (20–30s) for me too on Godot 4.0.stable, even when loading a tiny project. Once the project loads, the editor still feels a bit slow/laggy at times, especially when doing stuff in the FileSystem panel.
I'm using Windows 10 Home x64 (21H2), i7-3770K, GTX970 (457.30), 16GB RAM. Like CatastrophicDino above, my OS lives on an SSD, but Godot lives on a HDD (both fast drives).
Slow launch (20–30s) for me too on Godot 4.0.stable, even when loading a tiny project
Is every launch slow, or only the first launch on a specified project? Which rendering method are you using? Also, make sure to use 4.0.3 instead of 4.0.
but Godot lives on a HDD (both fast drives).
Can you reproduce this issue if you move Godot to a SSD?
I'm having the same issue with Godot 4.0.2 (Steam). It's super slow both to load the editor and to launch a project.
Windows 11 AMD Ryzen 5 7600X Radeon RX 6800 16G
Is every launch slow, or only the first launch on a specified project?
Only the first launch of each project. From the time the editor's UI appears (after the Godot splash screen), it takes another 20–30s to load the project and become responsive. On subsequent launches it only take about 3s. If I restart my machine the first launch will again be 20–30s.
Which rendering method are you using?
Forward+
Also, make sure to use 4.0.3 instead of 4.0.
I am using 4.0.3, sorry for the confusion.
Can you reproduce this issue if you move Godot to a SSD?
Yes, it's the same situation on both HDD and SSD. During the 20–30s delay there is constant disk access occurring, and this only subsides once the project has fully loaded.
Experiencing similar issues. Project runs perfectly on an M1 mac mini, on a windows pc (specs at bottom) I get a couple seconds of hang before the game boots. I do not experience this issue with Godot 3 LTS on the dodge the creeps demo.
Godot is running on my C drive, which is an SSD.
Windows 11 Pro
AMD Ryzen 5 3600
GTX 3080
X570 Aorus Elite
- Related to https://github.com/godotengine/godot-proposals/issues/3657.
If you start the editor from the command line with the --verbose
command line argument, do you notice shader cache lines being slowly printed while the editor opens?
You could also try using a C++ profiler on a debug build of the engine to see which functions are taking the most time to run. (Only 4.0 binaries are available so far, but I'll add 4.0.1/4.0.2/4.0.3 in due time.)
Here's a (super scuffed, sorry) demonstration of the project being run with --verbose
.
https://www.youtube.com/watch?v=WHFWTj5IWao
If you start the editor from the command line with the
--verbose
command line argument, do you notice shader cache lines being slowly printed while the editor opens?You could also try using a C++ profiler on a debug build of the engine to see which functions are taking the most time to run. (Only 4.0 binaries are available so far, but I'll add 4.0.1/4.0.2/4.0.3 in due time.)
Update -- 4.1 beta 1 seems to have noticeably faster startup times? Would like to know if anyone else has experienced this.
Yeah this seems to be fixed/working as intended for me on 4.1 beta 2
Can anyone try this workaround from https://github.com/godotengine/godot/issues/78369 (emphasis mine)?
I had Forward+ renderer as default. Strangely, if I switch renderer to Mobile / Compatible, and then back to Forward+ (which causes editor to restart), the delay disappears. If I close and open Godot manually, delay will be there again.
Can anyone try 4.1? Should be fixed.
Can anyone try 4.1? Should be fixed.
I've tried it and found that the start-up time is faster.
Thanks everyone for testing, closing as fixed in 4.1.