Remove redundant inner loop from AXRange::GetScreenRects
AXRange::GetScreenRects was written to handle cases where there are multiple lines per text anchor, but in practice this never happens, because each line of text gets its own InlineTextBox and thus its own anchor. Removing the inner loop drastically reduces the runtime cost, especially in cases where there are multiple nodes per line, since CreateNextLineStart/EndPosition can become linear in the number of nodes. On http://en.wikipedia.org I saw a 73% reduction in runtime for this method with the inner loop removed. Bug: 928948 Change-Id: I327d6369abaf0e697f8b9cf2156b9af2bcfce449 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1733794Reviewed-by:Kurt Catti-Schmidt <kschmi@microsoft.com> Reviewed-by:
Nektarios Paisios <nektar@chromium.org> Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com> Cr-Commit-Position: refs/heads/master@{#684182}
Showing
Please register or sign in to comment