[Webkit-unassigned] [Bug 102992] New: potential performance improvement when moving nodes within the DOM
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 21 16:47:23 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=102992
Summary: potential performance improvement when moving nodes
within the DOM
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: ojan at chromium.org
CC: eric at webkit.org, esprehn at chromium.org,
abarth at webkit.org, rafaelw at chromium.org
Right now, appendChild will first remove the child if it's already in the tree and walk the whole subtree via ChildNodeRemovalNotifier(this).notify(child.get())) to call removedFrom and clear it's inDocument flag. If the nodes get appended right back into the document, there's no need to walk the whole subtree. The tricky bit is that there may be sync JS events that fire (e.g. blur, unload, mutation events). So, we could, in theory, do something like ChildNodesLazySnapshot, where we put off this work until dispatchEvent is actually called or until the appendChild is done, at which point we only need to make sure the inDocument bit is set correctly on the root.
One tricky bit will be making sure InspectorInstrumentation + DOM breakpoints continue to work right. Again, we only need to walk the subtree if there are DOM breakpoints set.
Avoiding other walks of the tree in the DOM modification code have proven to be a big performance improvement (e.g. ~10%).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list