2009-11-18 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2009 02:13:20 +0000 (02:13 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2009 02:13:20 +0000 (02:13 +0000)
commitf6f7b9d4cf49690080651c9c81f6af6e85265211
tree0f9be4a8c854c371279fb1b1c55c6b0da24b111b
parent12da058804ea51ea5fd018bb8f0ea5aee5f0b3f5
2009-11-18  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Oliver Hunt.

        Fix REGRESSION (r47022): Performance of DocumentFragment.appendChild is 1000x slower sometimes
        https://bugs.webkit.org/show_bug.cgi?id=31237

        Also speeds up Dromaeo DOM Core tests by 1.31x.

        * bindings/js/JSNodeCustom.cpp:
        (WebCore::JSNode::markChildren): Change marking algorithm to avoid O(N^2) behavior. The subtree
        mark bit was no longer effective; instead I changed things so only a node that has no ancestors
        with wrappers would do marking; there should be only one in the typical case (the root of the
        detached subtree).
        * dom/Node.cpp:
        (WebCore::Node::Node): Remove now useless m_inSubtreeMark bit and related functions.
        * dom/Node.h: ditto

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/bindings/js/JSNodeCustom.cpp
WebCore/dom/Node.cpp
WebCore/dom/Node.h