Bug 88570 - Cache RenderLayer::isRootLayer for better performance
Summary: Cache RenderLayer::isRootLayer for better performance
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:
Keywords:
Depends on:
Blocks: 75001 92258
  Show dependency treegraph
 
Reported: 2012-06-07 13:13 PDT by Julien Chaffraix
Modified: 2012-09-18 11:57 PDT (History)
5 users (show)

See Also:


Attachments
Proposed new caching. (8.33 KB, patch)
2012-06-07 13:40 PDT, Julien Chaffraix
no flags 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-06-07 13:13:54 PDT
The current implementation is:

bool isRootLayer() const { return renderer()->isRenderView(); }

Our renderer() won't change during the RenderLayer lifetime time, nor will its type. This means we could easily cache this information in the constructor.

Adding this caching seems to help with painting time on http://dglazkov.github.com/performance-tests/biggrid.html.
Comment 1 Julien Chaffraix 2012-06-07 13:40:39 PDT
Created attachment 146373 [details]
Proposed new caching.
Comment 2 Ojan Vafai 2012-06-07 14:30:10 PDT
Comment on attachment 146373 [details]
Proposed new caching.

Much more readable now too!
Comment 3 WebKit Review Bot 2012-06-07 15:27:50 PDT
Comment on attachment 146373 [details]
Proposed new caching.

Clearing flags on attachment: 146373

Committed r119761: <http://trac.webkit.org/changeset/119761>
Comment 4 WebKit Review Bot 2012-06-07 15:27:54 PDT
All reviewed patches have been landed.  Closing bug.