Bug 92697

Summary: RenderObject needs a fast-path for removeAllChildren
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: jamesr, jchaffraix, kling, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 98281, 98336, 99741    
Bug Blocks: 92258    

Eric Seidel (no email)
Reported 2012-07-30 17:44:33 PDT
RenderObject needs a fast-path for removeAllChildren Looking at the sample of the benchmark attached to bug 92258. We see nearly 10% of total time (on a 300x300 grid sample), spent under ContainerNode::removeChildren() tearing down the associated rendering tree. Each renderer goes through and tell its ancestor chain that it's dying, and marks the view as needing repaint for its rect. We spend a bunch of time computing those repaint rects, and walking up/down the ancestor chain. Just like how we have a "fast path" for removing subtrees in the DOM, we need some smarter logic for removing subtrees in the rendering tree. At least in the non-positioned, flow cases, we should be able to have a single repaint rect instead of all this nonsense.
Attachments
Note You need to log in before you can comment on or make changes to this bug.