I know there are many discussions about this topic. I just want to share what fixed the issue for me and maybe it might help someone. I am using Godot 4.1.2 stable
My pc specs:
Win 11 build 22621
Ryzen 5 3500
GTX 1080 (latest nvidia drivers)
Issue:
Godot 4 takes an unusual amount of time to open and just display a blank window for around 30 to 40 seconds. Also, a blank window, for the same amount of time, when running any project even an empty project.
What worked for me:
I deleted Godot but kept my projects folder. I also deleted the Godot folders in appdata located at C:\Users{username}\AppData\Roaming\Godot and C:\Users{username}\AppData\Local\Godot. Then restart the pc. Don’t forget to reinstall Godot
If this doesn’t work then maybe it might be a usb device driver (corsair keyboard may be the culprit) as that was the cause for others facing the same issue.
Strangely it started happening when I configured android export to test my project on my phone (followed the steps in Godot docs). I did test the different rendering modes (Forward+, Mobile, Compatibility) but the issue was still there. After I deleted Godot and the appdata folders and followed the same steps to configure android export as well as test Godot with my phone plugged in and with my phone unplugged and it works fine now. I am unsure what caused it. My guess is it might’ve been corrupted cache or something.