Bug 11720 - REGRESSION: large amounts of CPU consumed viewing this site
Summary: REGRESSION: large amounts of CPU consumed viewing this site
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P1 Normal
Assignee: mitz
URL: http://www.wowhead.com/?talent-bc=ihe...
Keywords: HasReduction, InRadar, Regression
Depends on:
Blocks: 5399 5821
  Show dependency treegraph
 
Reported: 2006-11-29 17:45 PST by Rachael Worthington (cheers)
Modified: 2007-02-11 23:17 PST (History)
3 users (show)

See Also:


Attachments
Sample of Webkit Misbehaving (79.90 KB, text/plain)
2006-11-29 17:46 PST, Rachael Worthington (cheers)
no flags Details
Invalidate only the area where the updated image paints. Also fixes bug 5399. (33.62 KB, patch)
2007-02-01 14:50 PST, mitz
hyatt: review-
Details | Formatted Diff | Diff
Binaries part of the patch (931.40 KB, application/octet-stream)
2007-02-01 14:59 PST, mitz
no flags Details
Invalidate only the area where the updated image paints. Also fixes bug 5399 and bug 5821. (40.81 KB, patch)
2007-02-02 01:21 PST, mitz
hyatt: review+
Details | Formatted Diff | Diff
Binaries part of the patch (932.12 KB, application/octet-stream)
2007-02-02 01:23 PST, mitz
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rachael Worthington (cheers) 2006-11-29 17:45:10 PST
go to the above link in OmniWeb or the lates WebKit nightly, and watch your CPU consumption. It rockets up, and stays high, until you hide the page by opening a new tab over it. (being in a background tab it doesn't consume silly amounts of processing time, but hidden and in a front-most tab it does. I'm attaching a sample as well.
Comment 1 Rachael Worthington (cheers) 2006-11-29 17:46:01 PST
Created attachment 11675 [details]
Sample of Webkit Misbehaving
Comment 2 mitz 2006-11-30 11:58:38 PST
A huge part of the page is constantly repainting at 10fps due to one or two elements having a small animated gif as their non-repeating background image. Something like:
<div style="height: 500px; background: url(http://www.wowhead.com/images/loading2.gif) no-repeat"></div>
causes the entire div to repaint on each animation frame. Note that the background is non-repeating, so there's no reason to repaint the whole area. Shipping Safari repaints only the 16x16 area that animates.
Comment 3 Dave Hyatt 2006-11-30 12:09:52 PST
This is fallout from having a real animation observer architecture.  That the old way worked more efficiently was largely coincidental.  RenderObjects will have to study their background geometry and be smarter about what they repaint when they get told that a new animation frame is available.
Comment 4 Mark Rowe (bdash) 2007-01-28 19:12:57 PST
<rdar://problem/4960272>
Comment 5 mitz 2007-02-01 14:50:33 PST
Created attachment 12861 [details]
Invalidate only the area where the updated image paints. Also fixes bug 5399.
Comment 6 mitz 2007-02-01 14:59:06 PST
Created attachment 12862 [details]
Binaries part of the patch
Comment 7 Dave Hyatt 2007-02-01 16:10:57 PST
Comment on attachment 12861 [details]
Invalidate only the area where the updated image paints. Also fixes bug 5399.

(1) Inline flows need to be handled (if they're broken up across multiple lines).

(2) Would it be better to put the table checks into imageChanged  overrides in the table code itself?

(3) Change the htmlTag/bodyTag stuff to isRoot()/isBody().
Comment 8 mitz 2007-02-02 01:21:12 PST
Created attachment 12868 [details]
Invalidate only the area where the updated image paints. Also fixes bug 5399 and bug 5821.

Addressed Hyatt's comments: inline flows do a full repaint; table parts handled by overrides, also changed <col> to repaint the whole table instead of nothing, fixing bug 5821; changed to use isBody() and isRoot().
Comment 9 mitz 2007-02-02 01:23:37 PST
Created attachment 12869 [details]
Binaries part of the patch
Comment 10 Dave Hyatt 2007-02-07 02:18:59 PST
Comment on attachment 12868 [details]
Invalidate only the area where the updated image paints. Also fixes bug 5399 and bug 5821.

r=me
Comment 11 Mark Rowe (bdash) 2007-02-07 21:06:01 PST
Landed in r19490.
Comment 12 Mark Rowe (bdash) 2007-02-11 23:17:35 PST
Binary bits were in r19570.