Painting is currently back-to-front, even across iframe boundaries. That means that if an area of some foreground element is invalidated, we'll repaint everything behind it (potentially including expensive gradients, scaled background images etc) before painting the element itself. This could be optimized.
Created attachment 73180 [details] WIP patch This is a demonstration of how the optimization might work. If I tweak the test a little (make the iframe positioned), this makes some Peacekeeper tests 2-26% faster.
Comment on attachment 73180 [details] WIP patch Better patch coming.
Didn't mean to mark fixed.
Created attachment 73208 [details] Patch
Created attachment 73214 [details] Patch