Safari is extremely sluggish while large pages load incrementally. I believe the #1 reason it is so slow is that Safari does a full repaint of the visible area as the page loads. It doesn't handle the case where content is being appended offscreen (without affecting the visible content) well. Turn on Quartz debug and watch Safari paint the entire visible view over and over and over. Watch Firefox repaint only the scrollbar and its throbber. I have observed this effect on many pages. The problem is that we need to optimize for blocks (like the body and html elements) that grow when they have only a solid background color or a background image whose tiling/positioning is not affected by the increase in height. Right now we just naively repaint a whole block if its size changes after layout.
Created attachment 4604 [details] This seems to work. Here is a patch that solves the problem.
Created attachment 4605 [details] Version 2 Cleaned it up a bit.
Comment on attachment 4605 [details] Version 2 Looks fine. r=me
The attached patch was checked in on 2005-11-07.
The fix for this bug caused the following regressions: bug 5699, bug 6388, bug 6278, bug 6301, bug 6770, bug 6769 (not entirely a regression but made worse by this).