[Webkit-unassigned] [Bug 57059] New: input field with focus makes appendChild operation ~42x slower

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 24 15:36:07 PDT 2011


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

           Summary: input field with focus makes appendChild operation
                    ~42x slower
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Major
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: iiminar at gmail.com


Attached is a reduced test case from a large application that suffers from latency issues in Chrome/WebKit due to slow dom manipulation (specifically adding child nodes via appendChild).

The issue perf issue occurs only if the input field has a focus, if the same set of dom operations are invoked via provided button, the dom manipulation is fast.

I measured the perf difference and constantly see ~42x slowdown if the input field has focus (tested with r81868).

Test instructions:
- open the test case
- note how long it took to add 1000 li elements to the list present on the page (the number is displayed)
- click on the "toggle input" button, to cause 1000 li nodes to be removed from the list
- click on the "toggle input" button again to cause 1000 li nodes to be appended to the list and note how long it took
- now do the same by typing "x" into the input field and removing it and compare the results

You can also try invoking update('x') and update('') from console with and without placing focus on the input field with focus() to see the same results.

When the same test is run in Firefox 4, placing focus on the input field makes no difference in performance of appendChild operation.

I also tried testing the issue with Safari 5.0.4, and while it's not as bad there, the slowdown is ~21x.

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