Bug 5633 - Safari sluggish while loading large pages
: Safari sluggish while loading large pages
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To: Dave Hyatt
Depends on:
  Show dependency treegraph
Reported: 2005-11-05 00:25 PST by Dave Hyatt
Modified: 2006-02-10 13:43 PST (History)
2 users (show)

See Also:

This seems to work. (5.27 KB, patch)
2005-11-05 02:31 PST, Dave Hyatt
no flags Details | Formatted Diff | Diff
Version 2 (5.25 KB, patch)
2005-11-05 02:33 PST, Dave Hyatt
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hyatt 2005-11-05 00:25:39 PST
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.
Comment 1 Dave Hyatt 2005-11-05 02:31:15 PST
Created attachment 4604 [details]
This seems to work.

Here is a patch that solves the problem.
Comment 2 Dave Hyatt 2005-11-05 02:33:58 PST
Created attachment 4605 [details]
Version 2

Cleaned it up a bit.
Comment 3 Darin Adler 2005-11-05 08:06:28 PST
Comment on attachment 4605 [details]
Version 2

Looks fine. r=me
Comment 4 mitz@webkit.org 2005-12-25 11:40:02 PST
The attached patch was checked in on 2005-11-07.
Comment 5 mitz@webkit.org 2006-02-10 13:43:56 PST
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).