[webkit-changes] [WebKit/WebKit] 610bbd: Setting the value of a textarea is much slower in ...
Darin Adler
noreply at github.com
Fri Nov 11 17:09:47 PST 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 610bbdbf42f2cad4bb6a06eadd3e6fcc735cc59b
https://github.com/WebKit/WebKit/commit/610bbdbf42f2cad4bb6a06eadd3e6fcc735cc59b
Author: Darin Adler <darin at apple.com>
Date: 2022-11-11 (Fri, 11 Nov 2022)
Changed paths:
M Source/WTF/wtf/text/StringView.cpp
M Source/WTF/wtf/text/StringView.h
Log Message:
-----------
Setting the value of a textarea is much slower in WebKit than it is in Chromium
https://bugs.webkit.org/show_bug.cgi?id=247739
rdar://problem/102218029
Reviewed by Alexey Proskuryakov.
These changes make the micro-benchmark of setting the text of a textarea about 4x faster.
* Source/WTF/wtf/text/StringView.cpp:
(WTF::makeStringBySimplifyingNewLinesSlowCase): Added. Implements a faster algorithm for
standardizing line endings as opposed to making two passes through the string.
* Source/WTF/wtf/text/StringView.h:
(WTF::makeStringBySimplifyingNewLines): Added a high-speed check for '\r' characters before doing
the slower algorithm to standardize line separators. Most strings won't have any at all, and none
of the ones in the benchmark do.
Canonical link: https://commits.webkit.org/256596@main
More information about the webkit-changes
mailing list