[webkit-dev] attached()

David Hyatt hyatt at apple.com
Thu Sep 9 09:45:25 PDT 2010

On Sep 9, 2010, at 2:00 AM, Eric Seidel wrote:

> Instead, we could change all elements to mark themselves (and their
> parents) as needing style recalc during insertedIntoDocument(),
> effectively "attaching/lazyAttaching".

lazyAttach is poorly implemented right now, since it is relying on style recalculation to trigger the attachment when it should have used a new timer.  Right now because it is latching onto the style recalc timer and tree it is wasting time doing recalc styles on all of the ancestors of any elements that need attaching.  That's just bad.

This means the normal attach() process performs better (and is presumably still used by the parser).

We should fix lazyAttach to use its own timer and tree walk independent of recalcStyle that just calls attach() instead on children that need it.

(hyatt at apple.com)

More information about the webkit-dev mailing list