[Webkit-unassigned] [Bug 13445] New: NodeList access by index is slow

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 22 01:55:45 PDT 2007


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

           Summary: NodeList access by index is slow
           Product: WebKit
           Version: 522+ (nightly)
          Platform: Macintosh
               URL: http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core
                    /001.html
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ap at webkit.org


On the "index" part of this test (see bug URL), WebKit is much slower than
other browsers.

On my machine, TOT is even somewhat slower than shipping Safari (~6 seconds vs.
~7 seconds), but I'm hesitant to make the bug P1 because of this. Almost all of
the time is spent calling nextSibling(), which is a single memory access
instruction, so the test is memory-bound, and it's probably semi-random changes
in memory layout that cause this.

    while (n && pos < index) {
        n = n->nextSibling();
        pos++;
    }

Looking at the assembly, I noticed that gcc 3.3 and gcc 4.0.1 generate slightly
different PowerPC code for this loop. That doesn't appear to affect performance
much - I made a reduced test, and gcc 4 code was not slower.


-- 
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