Noticeable animation lag/stutter upon driver shader cache creation
This has started happening since the introduction of the new NGL and Vulkan renderers (it happens with both of them). It also happens after every graphics driver update.
How to reproduce with system GTK apps:
- Delete your mesa shader cache in .config (or whatever is your shader cache folder if you don't use mesa) and reboot your system.
- After boot, open any Libadwaita app and navigate some pages that have animations (for example the ones in "about app").
- As you can see, there's a noticeable animation lag for the first few seconds.
This is even more noticeable with Libadwaita apps from Flathub, since each app has its own separate driver shader cache. After a Flathub mesa runtime update, the animation lag happens with every Libadwaita app opened for the first time after the mesa runtime update. This also causes the Libadwaita Flathub app to launch a bit slower.
Since my GPU is a Radeon RX 580, I first thought this probably had something to do with the shader compiler of AMD's mesa OpenGL driver, which is known to be a bit slow at compiling shaders. But I've also tried the Vulkan renderer, since AMD Vulkan mesa driver uses a different shader compiler (ACO) which is known to be very fast, but I was still experiencing the same stutters as with NGL.