Optimize AXPosition CompareTo using uncommon ancestors
Testing with Windows Narrator scan mode on Wikipedia showed we were spending an inordinate amount of time comparing text positions due to the cost of creating ancestor positions. This CL avoids that cost by comparing the order of the first uncommon ancestors for each node, when it's possible to do so. Testing on https://en.wikipedia.org/wiki/List_of_highest-grossing_films with Narrator scan mode heading movement showed a reduction of about 87% CPU usage on the browser main thread with this CL. Bug: 1029867 Change-Id: I7efae50517a561319dad81668c49ec5f6ae900b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1999083 Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:
Jacques Newman <janewman@microsoft.com> Reviewed-by:
Adam Ettenberger <adettenb@microsoft.com> Reviewed-by:
Ethan Jimenez <ethavar@microsoft.com> Cr-Commit-Position: refs/heads/master@{#732522}
Showing
Please register or sign in to comment