Bug 5633

Summary: Safari sluggish while loading large pages
Product: WebKit Reporter: Dave Hyatt <hyatt>
Component: Layout and RenderingAssignee: Dave Hyatt <hyatt>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, mitz
Priority: P2    
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSFrameConstructor.cpp
Attachments:
Description Flags
This seems to work.
none
Version 2 darin: review+

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 2005-12-25 11:40:02 PST
The attached patch was checked in on 2005-11-07.
Comment 5 mitz 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).