[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 22:01:36 PST 2013


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





--- Comment #8 from Nils Barth <nbarth at chromium.org>  2013-03-06 22:04:00 PST ---
(In reply to comment #7)
> (In reply to comment #4)
> > Regression is in Chromium r-103242 http://crrev.com/103242
> > which is a WebKit roll r96201:96267 (r96201:r96267).
> > 
> > Revision r96257 by Ryosuke, fixing:
> 
> That's not my patch although I reviewed it.

Oops, sorry! (For the record, patch by Una Sabovic)

> The key is to mass-remove nodes as much as possible since the cost of updating selection manifests only at a node removal.

Abstractly, the two natural solutions are:
1. Make updating selection fast
2. Avoid updating selection (e.g., batch node removals)

Looking at the solution in r115460 (by Enrica Casucci ;-) for
Bug 83983 - REGRESSION(r96257): Deleting a large amount of text is very slow
http://trac.webkit.org/changeset/115460

...looks like it just speeds up the computation, without needing to make major code changes (i.e., #1). Perhaps we can do something similar here.

In terms of numbers, I'm guessing we're hitting an O(n^2) algorithm here, presumably doing something O(n) to update the selection for each of the n child nodes. If we can make updating the selection O(1) without much trouble, this would solve it.

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