Bug 92697 - RenderObject needs a fast-path for removeAllChildren
Summary: RenderObject needs a fast-path for removeAllChildren
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 98281 98336 99741
Blocks: 92258
  Show dependency treegraph
 
Reported: 2012-07-30 17:44 PDT by Eric Seidel (no email)
Modified: 2012-10-18 11:48 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 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.