Bug 57571 - We spend time in updateLayerPositions() for every layout, whether or not layers changed
Summary: We spend time in updateLayerPositions() for every layout, whether or not laye...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://cnn.com
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-03-31 13:24 PDT by Simon Fraser (smfr)
Modified: 2012-04-17 14:29 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2011-03-31 13:24:42 PDT
When cnn.com does layout, there are a lot of calls to RenderBox::computeRectForRepaint(), via RenderLayer::updateLayerPositions(). It's inefficient for the following reasons:

1. We don't track whether any layers actually changed, so we may not actually have to do any work
2. We're walking down the RenderLayer tree, but for each layer walking back up the renderers doing computeRectForRepaint(), so it's > O(N)
Comment 1 Simon Fraser (smfr) 2011-03-31 13:25:51 PDT
<rdar://problem/9216902>
Comment 2 Simon Fraser (smfr) 2011-03-31 13:50:01 PDT
Ideas here:
1. remove the repaint code from layers (hyatt says it's old)
2. have layout detect when a layer is moved or resized