When using OpenGL, setting setBufferedToImage on child components makes things super slow (in my example some rather static components taking 20% cpu when not cached take 60% when cached!)
This is due to the image's cached texture being invalidated even when the component doesn't get redrawn, due to a bug. (A Graphics context gets created for the image even when the component isn't invalidated, and this invalidates the cached texture)
Here's the fix: https://github.com/yairchu/JUCE/commit/11c0998feba41c2ea674d739735124a7b1b06c3a
In my above example the 60% cpu turns into 10% after the fix, making a nice improvement over the 20% with just a few setBufferedToImage calls.
Also, before the fix most of the CPU was spent in juce::Flipper, flipping the images before loading into an OpenGL context. I suppose that could be sped up significantly by maybe having the textures being stored flipped??