UIA move-by-format performance improvements
This change introduces two main optimizations for move-by-format. Both of these optimizations combined end up improving performance of Narrator heading moves by 25% on NYTimes.com and 40% on a reduced test page. I'm now seeing the format move cost dwarfed by the GetAttributeValue cost for Narrator Scan Mode move-by-heading, which I'll look into next. The first category of improvements in this change is from replacing AsLeafTextPosition calls with AsLeafTreePosition. When we're moving by format in intermediate steps, it doesn't matter whether the node is a tree position or a text position, so this avoids expensive MaxTextOffset calls. The second category involves returning a reason why a format boundary was determined. I saw that we were calling Create(Next/Previous)TreePosition several times just to see if a move is at the end of a document. So a more complex return value that provides the reason of why a format boundary exists allows us to not have to do that work multiple times. The AXBoundaryType enum class added with this change provides this information, with the new method 'GetFormatEndBoundaryType' doing the work of determining format boundaries and returning the appropriate AXBoundaryType. Bug: 1029867 Change-Id: I12151ab2b4000227e1d5e2726223a7545d73bc2e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1965865Reviewed-by:Kevin Babbitt <kbabbitt@microsoft.com> Reviewed-by:
Nektarios Paisios <nektar@chromium.org> Commit-Queue: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#727375}
Showing
Please register or sign in to comment