[Webkit-unassigned] [Bug 16478] New: Redundant isElement checks in NodeLists

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 17 11:00:59 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16478

           Summary: Redundant isElement checks in NodeLists
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Trivial
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: catfish.man at gmail.com


A small (0.6-1.6% on one test I made) speedup for getElementsByClassName is
possible by removing what appears to be a redundant check of
testNode->isElement in nodeMatches. A similar check exists in TagNodeList, but
not other subclasses of NodeList. Searching for nodeMatches project-wide in
WebCore turns up four callsites, three of which have their own isElement
checks, and the last of which uses getElementByID to get the node. olliej
suggested putting an ASSERT in instead of a check, so as to make sure that no
future callsites accidentally leave out the isElement check.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list