Shader Variant runtime prewarm unexpectedly slow. Why?

Hello.
Our pipeline to prewarm shaders:

Editor time:

  • collect android logcat messages with compiled shader variants
  • parse them to ShaderVariantCollection. ShaderVariant
  • remove invalid variants

Runtime:

  • filter variants by runtime situation (for example - use shadow or not)
  • for each variant
  • Temp ShaderVariantCollection. Add(variant)
  • Temp ShaderVariantCollection. WarmUp()
  • Temp ShaderVariantCollection. Clear()
  • skip frame

And eveything work as expected, but: warmup take huge time, but not for simple compile by rendering.
Honor 10 XLite: ~700 ms for first warmup after install, variant with 6 Keywords.
Redmi 9C: ~18 000 ms for first warmup after install, variant with 7 Keywords.

  • Unity 2020.3.18f1
  • Android

Can anyone tell me - why?

A bit later I’ll add more info here.

bump

same here, we used automation to collect list of common shader variant and prepare to warm it up during game loading, significantly slow when tested on android low end phone (oppo 16)

9049579--1250347--upload_2023-6-1_14-29-56.png