Reviewed by Maciej.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2007 06:43:49 +0000 (06:43 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2007 06:43:49 +0000 (06:43 +0000)
commit341ffff51061a6a15dc33ce79b554cdb85d65101
tree19176236dcc8cf1f99193b6df3e8564f67d72b95
parent5e7f89d8b19d87c99ff46f0989328b268709e00b
    Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=14977
        Hixie's DOM Core performance test shows insert >10x slower than append

        Each invocation of Element.childNodes[n] was creating and registering a new ChildNodeList,
        which persisted and listened to notifications until GC.

        A fix is to avoid registering child node lists for notifications - they don't need them, as
        they share a common cache in Node.

        * dom/Node.cpp:
        (WebCore::Node::registerNodeList):
        (WebCore::Node::unregisterNodeList):
        (WebCore::Node::notifyLocalNodeListsAttributeChanged):
        (WebCore::Node::notifyLocalNodeListsChildrenChanged):
        * dom/NodeList.h:
        (WebCore::NodeList::needsNotifications):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/dom/Node.cpp
WebCore/dom/NodeList.h