Shader (saving) compilation in UE5 is too slow

Hello, I have a problem with compiling any shader after saving. This process takes ~7 minutes for every shader. Even if it’s a simple particle shader.
I have this problem in UE5+ even in a new empty project. In UE4 versions shader compilation takes only 1 second.
Do you know how to fix this or do you have a similar problem?

In UE4 it’s instant, it takes 0 seconds, but 7 minutes in UE5…

You might want to look for where your Unreal Cache is and delete the folders in there. As you use Unreal, they grow in size. However, after deleting, Unreal would create them again when you open/start a project

Do you mean if I delete the cache, the materials will be saved faster?

I tried it. Nothing changed.
I will try to reinstall my UE5.0 on another ccd.
Upd. Tried and still no luck :confused:

Just to keep an open mind on the possible causes, what is the size of the textures you have in the shader? Do you have the project on an SSD? I have not experienced something like this so I am not sure exactly what the cause of the problem is; it might be one or multiple causes. So the only thing is to exhaust all options till a solution is found.

All textures 512x512. I have a very fast SSD. I think I could be related to the UE5 (every version: 5.0, 5.1, 5.2, 5.3) settings because all is fine with all UE4. Now I will try to move my project and UE to another ssd.

Ok, it’s not related to ssd.

Then we can assume it is related to the UE5 version

It’s not related to plugins. I disabled almost all.

Ok. The answer is: One primary one is that the engine has been re-architected to support features such as dynamic global illumination and ray tracing , which can increase the time needed to initialize the engine and load assets.
:face_with_diagonal_mouth: :face_with_diagonal_mouth: :face_with_diagonal_mouth:

https://twitter.com/amu_mhr/status/1570984252598255617
Maybe give this a try :slight_smile:

1 Like

Thank you, you saved me a lot of time.
I opened BaseEditor.ini in UE5 folder and disabled this:

2 Likes