-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optimization to get a11y next word #7789
Conversation
Our tests have missed big issues before -- is there a way we can build trust in this? @codeofdusk I know you tested the combination of #7770 and #7789 before; were there any concerns? |
b6fb987
to
3248d1b
Compare
Nope, works great! |
I recall word navigation feeling very sluggish. If this is noticeably better (like: is it usable???), I can easily sell it 😄 |
Certainly better, although please look into #5243.
To whom? |
As we get later in the Windows development cycle, we transition from feature work to bug work. After we move to bugs only, we start having to justify the fixes and their risks so that we're not introducing unnecessary/unhelpful changes as we get closer to release. 😄 |
const auto bufferSize = GetSize(); | ||
// move to the beginning of the next word | ||
// NOTE: _GetWordEnd...() returns the exclusive position of the "end of the word" | ||
// This is also the inclusive start of the next word. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLEVER.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love to know the answers to my questions, but this looks technically sound.
@msftbot merge this in 5 minutes |
Hello @carlos-zamora! Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:
If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you". |
This fix was just released as part of Windows in Insider Build 20236! |
This performs a minor refactor on `TextBuffer::MoveToNextWord` that relies more heavily on `TextBuffer::GetWordEnd`. Now, the logic is simplified and looks more like `MoveToPreviousWord`. This refactor required me to move the `lastCharPos` optimization down to `GetWordEnd`. So word expansion gets this optimization for free now. ### WPR Traces The percentages below represent the weight that a function call had. The test scenario included moving by word on the CMD welcome message until the last word was reached. Inspect.exe was used to limit any additional calls that are generally performed by a screen reader. | function | current | branch | | -- | -- | -- | | `UIA:Move` | 34.55% | 29.52% | There is an improvement of about 5% in a release build of ConHost. NOTE: `UIA::Move` already calls `Expand` after a move operation is performed. I'm using this data to represent a performance improvement across both functions. Contributes to #5243 (cherry picked from commit 386ae04)
🎉 Handy links: |
🎉 Handy links: |
This performs a minor refactor on
TextBuffer::MoveToNextWord
thatrelies more heavily on
TextBuffer::GetWordEnd
. Now, the logic issimplified and looks more like
MoveToPreviousWord
.This refactor required me to move the
lastCharPos
optimization down toGetWordEnd
. So word expansion gets this optimization for free now.WPR Traces
The percentages below represent the weight that a function call had. The
test scenario included moving by word on the CMD welcome message until
the last word was reached. Inspect.exe was used to limit any additional
calls that are generally performed by a screen reader.
UIA:Move
There is an improvement of about 5% in a release build of ConHost.
NOTE:
UIA::Move
already callsExpand
after a move operation isperformed. I'm using this data to represent a performance improvement
across both functions.
Contributes to #5243