[Webkit-unassigned] [Bug 57061] New: REGRESSION(r74228-75294): nth-child pseudo class makes removeChild ~200x slower

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 24 15:42:34 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=57061

           Summary: REGRESSION(r74228-75294): nth-child pseudo class makes
                    removeChild ~200x slower
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P1
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: iiminar at gmail.com


Created an attachment (id=86849)
 --> (https://bugs.webkit.org/attachment.cgi?id=86849&action=review)
reduced test case

This issue is related to issue 57059 and makes the DOM node removal super slow.

If all of these are true:
- there is nth-child pseudo class is applied to li elements in a list
- there is an input field with focus in the document (issue 57059)
- some of the elements are removed from the list (direction: top/middle to bottom)

the removal operation takes up to 200x longer than without the selector (tested with r81868).

Attached is a test case that demonstrates this issue.
- type "x" into the input field to remove 1000 li nodes
- time it took to do that is displayed on the page
- empty the input field to cause new 1000 nodes to be added
- click on the "toggle css" button to apply the nth-child selector to li elements
- type "x" into the input field to again remove 1000 li's
- note the time. it should be considerably higher
- if you remove the css from li's by clicking on the toggle button again and repeat the addition/removal of nodes, you'll notice that while the removal is faster than the slowest case, it's still ~100x slower than when you refresh the page and start from scratch.

For some reason applying the css and triggering issue 57059 makes the dom removal really slow and the effect lasts even after the css was removed.

The issue was introduced in r75294 and is still present in r81868.

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



More information about the webkit-unassigned mailing list