Skip to content
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

Improve Word Navigation/Selection Performance #4797

Merged
4 commits merged into from
Mar 4, 2020

Conversation

carlos-zamora
Copy link
Member

@carlos-zamora carlos-zamora commented Mar 4, 2020

Summary of the Pull Request

  1. Improves the performance of word-recognition operations such as word
    navigation in UIA and selection.

  2. Fixes a bug where attempting to find the next word in UIA, when none
    exists, would hang

  3. TraceLogging code only runs when somebody is listening

Detailed Description of the Pull Request / Additional comments

  • The concept of a delimiter class got moved to the CharRow.
  • The buffer iterator used to save a lot more information than we needed
  • I missed updating a tracing function after making GetSelection return
    one text range. That is fixed now.

Validation Steps Performed

Performed Word Navigation under Narrator and NVDA.
NOTE: The release build should be used when testing to optimize
performance

Closes #4703

@carlos-zamora carlos-zamora added Area-Accessibility Issues related to accessibility Product-Terminal The new Windows Terminal. labels Mar 4, 2020
Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent.

src/buffer/out/CharRow.cpp Outdated Show resolved Hide resolved
src/buffer/out/CharRow.hpp Outdated Show resolved Hide resolved
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it. thanks

@carlos-zamora carlos-zamora added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 4, 2020
@ghost
Copy link

ghost commented Mar 4, 2020

Hello @carlos-zamora!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@DHowett-MSFT
Copy link
Contributor

Kicking the x86 to run that leg again

@ghost ghost merged commit 267deaa into master Mar 4, 2020
@ghost ghost deleted the dev/cazamor/acc/word-nav-perf branch March 4, 2020 23:10
@codeofdusk
Copy link
Contributor

While the performance of debug builds (i.e. just running bcz with no arguments) is still slow, generating a release build with bcz release (as suggested in the PR description) dramatically improves UIA word navigation for both patched NVDA and Narrator. Thanks @carlos-zamora!

@DHowett-MSFT
Copy link
Contributor

@codeofdusk thank you for testing this out!

@codeofdusk
Copy link
Contributor

@DHowett-MSFT @carlos-zamora As an aside, do you have an idea of when work on new text events for terminal (#2447) will start? Once implemented we can add support for Windows Terminal to NVDA.

@carlos-zamora
Copy link
Member Author

@DHowett-MSFT @carlos-zamora As an aside, do you have an idea of when work on new text events for terminal (#2447) will start? Once implemented we can add support for Windows Terminal to NVDA.

@codeofdusk I've been working on that now but I've been having trouble getting them to work (specifically for output). I'm able to fire a TextChanged event when new output appears, but I can't seem to understand how my UIA Providers are able to respond. Is it dependent on a setting on the XAML control?

@codeofdusk
Copy link
Contributor

@DHowett-MSFT @carlos-zamora As an aside, do you have an idea of when work on new text events for terminal (#2447) will start? Once implemented we can add support for Windows Terminal to NVDA.

@codeofdusk I've been working on that now but I've been having trouble getting them to work (specifically for output). I'm able to fire a TextChanged event when new output appears, but I can't seem to understand how my UIA Providers are able to respond. Is it dependent on a setting on the XAML control?

I'd think firing a text changed event would suffice, but I'm not quite sure. Could you send a test build/point me at a branch and I can explore with NVDA? Cc @michaelDCurran and @LeonarddeR for more detailed implementation suggestions.

@carlos-zamora
Copy link
Member Author

@DHowett-MSFT @carlos-zamora As an aside, do you have an idea of when work on new text events for terminal (#2447) will start? Once implemented we can add support for Windows Terminal to NVDA.

@codeofdusk I've been working on that now but I've been having trouble getting them to work (specifically for output). I'm able to fire a TextChanged event when new output appears, but I can't seem to understand how my UIA Providers are able to respond. Is it dependent on a setting on the XAML control?

I'd think firing a text changed event would suffice, but I'm not quite sure. Could you send a test build/point me at a branch and I can explore with NVDA? Cc @michaelDCurran and @LeonarddeR for more detailed implementation suggestions.

Sure! I'll send it in the morning and @ you three in #2447. Thank you so much!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Accessibility Issues related to accessibility AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conhost: UIA word navigation is slow
4 participants