[Webkit-unassigned] [Bug 94733] 2400% performance regression when performing innerHTML in contentEditable/designMode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 6 21:32:57 PST 2013


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





--- Comment #4 from Nils Barth <nbarth at chromium.org>  2013-03-06 21:35:22 PST ---
Regression is in Chromium r-103242 http://crrev.com/103242
which is a WebKit roll r96201:96267 (r96201:r96267).

Revision r96257 by Ryosuke, fixing:
Bug 62092 - Setting innerText to an empty string on editable div loses focus ...looks suspicious, and is the likely culprit.

This change caused a different regression, fixed in r115460 namely:
Bug 83983 - REGRESSION(r96257): Deleting a large amount of text is very slow

The changeset message for r115460 is very instructive:
"The change in r96257 did not cause the performance regression per se, but exposed a problem ...
If the container has a very large number of children, we walk the entire list of child nodes in the container simply to find out how many they are."

So the concrete issue looks like:
Updating selection on (start/end?) child node removal is slow (b/c triggers some underlying slow computation, say offset).
Prior to r96257 the selection was *cleared* if start/end node was deleted, so this wasn't triggered. When this bug was fixed (preserving the selection), it hit the slow computation.

Revision r115460 fixed some of these regressions, but, given this bug, not all. Probably has similar cause and fix to that bug.

Other notes:
Ryosuke comments at http://crbug.com/139552#c3 that:
"This is probably because we're updating selection on every child node removal."

To Kentaro:
Thanks for the benchmark ref!
I'll next work on building a simple test case, as we'll need it anyway, and then look at which slow code we're hitting.

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