FrameView::scrollContentsFastPath has a fixedObjectThreshold of 5: if there are more than 5 fixed-positioning elements on the page, it will fall out of the fast (blit) path and repaint everything.
This doesn't make sense - causing repaints of the whole page just because someone used 5 (or 10, or whatever) tiny fixed-position elements is wasteful (and vice versa, blitting the whole window and then just going ahead and redrawing it all because someone used only one enormous fixed-position element also doesn't make sense).
We can make trivial use of regions and threshold based on percentage of the view that will need to be repainted by fixed-position elements.
I've tested a few different thresholds with an internal test; 50% seems to work relatively well, but the ideal value is hard to determine and likely depends on hardware.
I have a patch.
Created attachment 142292 [details]
Ooh, that's excellent. That seems like a much better heuristic.