Bug 85678 - Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
Summary: Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL: http://dglazkov.github.com/performanc...
Keywords:
Depends on:
Blocks: 75001 92258
  Show dependency treegraph
 
Reported: 2012-05-04 15:51 PDT by Julien Chaffraix
Modified: 2012-09-18 11:57 PDT (History)
6 users (show)

See Also:


Attachments
Propsed change. Nice improvement. (2.10 KB, patch)
2012-05-04 16:05 PDT, Julien Chaffraix
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-05-04 15:51:16 PDT
Currently RenderLayer::paintLayer() doesn't check for leaf non self-painting layers (it checks for fully transparent layers though). However in this case, we have no work to do.

For cases like tables with RenderLayers on every cells where the RenderLayer tree is heavily weighted by its leafs, paintLayer() is introducing some overhead.

The benchmark in mind here is http://dglazkov.github.com/performance-tests/biggrid.html. Create a 10,000 rows x 50 columns and tick "overflow: hidden" (which creates an overflow RenderLayer on all the cells): in this case, the paint time when scrolling is around 120 ms on my machine. This is due to walking all RenderLayers and doing some checks to end up not painting as we are not visible and don't need to anyway.

Patch forthcoming.
Comment 1 Julien Chaffraix 2012-05-04 16:05:21 PDT
Created attachment 140349 [details]
Propsed change. Nice improvement.
Comment 2 Darin Adler 2012-05-04 17:54:02 PDT
Comment on attachment 140349 [details]
Propsed change. Nice improvement.

View in context: https://bugs.webkit.org/attachment.cgi?id=140349&action=review

> Source/WebCore/ChangeLog:13
> +        For RenderLayer trees heavily weigthed by their leafs (like a table with a leaf RenderLayer for each cells),

typo: weigthed

I would just say:

     For layer trees that have a large number of leaf nodes
Comment 3 Julien Chaffraix 2012-05-04 19:16:26 PDT
Committed r116203: <http://trac.webkit.org/changeset/116203>
Comment 4 Julien Chaffraix 2012-05-10 10:22:34 PDT
Comment on attachment 140349 [details]
Propsed change. Nice improvement.

Clear cq? flag from old attachment.
Comment 5 mitz 2012-06-27 00:16:27 PDT
This cause bug 90052.
Comment 6 mitz 2012-06-27 00:16:56 PDT
Sorry, I mean that <http://trac.webkit.org/r116203> caused bug 99052.