I built a graph-based rendering system for my UI application ( http://audulus.com , if you're interested). The user interface of the application is procedural, and many of them are animated. There are several pre-processed images.
He currently caches immutable drawing groups in mipmapped textures. I use mipmaps because the user interface is scalable. In general, it was a big gain in performance, but there are several drawbacks:
Building mipmaps (via glGenerateMipmap) takes time, reducing frame rates when one part of the user interface moves from animated to static.
Visual differences between textured cached geometry, not a little flicker. (You can get around this by being smarter with my path rendering code, but it seems difficult)
Memory usage for all textures (I could reset the textures off the screen, but this exacerbates the problem 1)
A few alternative approaches that I thought of:
Instead of caching textures, static paths are merged into larger paths. My paths are already based on VBO / VAO, but this can reduce the number of GL calls. (When disabling texture caching, my performance is mostly processor related). Big win in memory usage. The main problems with this approach are as follows: complication of the path shader (since it must process paths with different attributes during one glDrawArrays call) without processing the caching of other primitives (for example, text) and a greater load on the GPU than just rendering the texture.
Still use textures, but avoid mip-mapping. As the user interface grows, textures can change (although this may have to be postponed, as re-rendering the entire user interface during scaling is too expensive). Remove textures for off-screen geometry. The disadvantage, of course, is a poor increase / decrease in texture when scaling the user interface.
UPDATE
I tried (2). Texture resizing is pretty slow, so I can't resize the user interface while scaling. This works pretty well, but the increase becomes terrible at scaling, starting from small:

Please note that some of the modules are not texture cached as they are marked as animations.
UPDATE 2
I'm starting to work with approach 1, so I deactivated texture caching.
Although I am attached to the processor, almost all the loading of my GPU file comes from my path smoothing fragment shader. Here's what performance looks like with it:

And with him:

Thus, further optimization of this will be a big victory on the GPU side. I tried to intercept it and switched with 4 supersampling, but it seems like garbage, reminding me why I spent a lot of time creating a path shader.
source share