-
Kevin Babbitt authored
MaxTextOffset was computing the total text string for a given node in UTF-16 just to obtain its length. Taking the length of std::string is a constant-time operation, so eliminating this effort reduces the scale factor from number of characters to number of nodes. On a simple test page this led to a 24% speedup in MaxTextOffset which is used by a variety of TextPattern methods. Bug: 970297 Change-Id: Ie40e8032b72a45510a2a9ee6bc0e4c4cf5564627 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730094 Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com> Reviewed-by:
Nektarios Paisios <nektar@chromium.org> Reviewed-by:
Kurt Catti-Schmidt <kschmi@microsoft.com> Cr-Commit-Position: refs/heads/master@{#683359}
c37c0da5