Skip to content
  • dsmith@webkit.org's avatar
    WebCore: · 6e5aa3f8
    dsmith@webkit.org authored
    2008-06-26  David Smith  <catfish.man@gmail.com>
    
            Reviewed by Sam Weinig.
            
            https://bugs.webkit.org/show_bug.cgi?id=19002
            
            Optimize simple id selectors in querySelector/querySelectorAll. 
            ~4.4x speedup on the 4 subtests of http://webkit.org/perf/slickspeed/ that it applies to.
    
            * dom/Document.h:
            (WebCore::Document::containsMultipleElementsWithId): Added to allow optimizing the common case of no duplicates
            * dom/Node.cpp:
            (WebCore::Node::querySelector): Uses getElementById instead of DOM traversal where possible now
            * dom/SelectorNodeList.cpp:
            (WebCore::createSelectorNodeList): Uses getElementById instead of DOM traversal where possible now
    
    LayoutTests:
    
    2008-06-26  David Smith  <catfish.man@gmail.com>
    
            Reviewed by Sam Weinig.
            
            https://bugs.webkit.org/show_bug.cgi?id=19002
            
            Optimize simple id selectors in querySelector/querySelectorAll. 
            ~4.4x speedup on the 4 subtests of http://webkit.org/perf/slickspeed/ that it applies to.
    
            * fast/dom/SelectorAPI/dumpNodeList-expected.txt:
            * fast/dom/SelectorAPI/dumpNodeList.html: Add tests for finding ids not in the document, and finding duplicate ids
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    6e5aa3f8