First off: I am not talking about Shader Compilation taking a long time, or stripping not working.
When I build, some shaders take more than ten minutes to “prepare” the variants:
As you can see in the screenshot, the variants are correctly stripped, and then the remaining variants are retrieved from cache, so it’s not the compilation that takes time.
What is this insane “prepare” step? How can I avoid it? It’s also not something that goes away on a ‘warm’ build, the screenshot is not from the first build.
I tried to reproduce it in a clean project. This is for the same shader (URP/Lit). Here, the preparing step is not long enough to even show in the log & the build is done quickly:
CLEAN PROJECT:
Does anybody have any idea what project settings influence this Prepare/Process step? What’s causing my one project to spend 30 minutes preparing variants, and a clean project does it instantly?