Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Setting the value of a textarea is much slower in WebKit than it is i…
…n 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
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters