Compiling shader variants is very time consuming.

Sorry, this question itself was a misunderstanding.

This depends on your usage. If you are using a large amount of keywords, the variants compiled are every permutation. Note if you have fog and lighting keywords forced enabled in graphics settings, this can particularly be a lot of variants.

Yes, sorry.
I’m embarrassed to say this, but…
I think I put Lit in “always included shaders”.
As the unity manual says, this is not recommended behavior.

Well, in all fact the problem is far worse than that. URP is currently extremely bad at disabling variants, as in it keeps variants for features that absolutely certainly are disabled, including lightmap modes etc. Looking at the code, there are far more TODOs in that section than what I would consider to be even remotely acceptable for “production ready” code. We have had to fork the pipeline to remove the variants we are not using by hand, we were ending up with Lit being 90MB in memory at runtime, and low tens of MB for every ShaderGraph shader compiled.