Bug 85678

Summary: Leaf non self-painting layers should bail out early in RenderLayer::paintLayer
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: enne, eric, jamesr, mitz, simon.fraser, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://dglazkov.github.com/performance-tests/biggrid.html
Bug Depends on:    
Bug Blocks: 75001, 92258    
Attachments:
Description Flags
Propsed change. Nice improvement. darin: review+

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.