Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 610bbdbf42f2cad4bb6a06eadd3e6fcc735cc59b
https://github.com/WebKit/WebKit/commit/610bbdbf42f2cad4bb6a06eadd3e6fcc735cc59b
Author: Darin Adler <[email protected]>
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
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes