Drop UIA property change events in 1Password to fix poor performance.#11011
Merged
Conversation
1Password floods property change events whenever you move between items in the list. Because NVDA listens to all property changes and instantiates NVDAObjects in most cases, this causes severe sluggishness. To work around this, drop problematic property change events from 1Password as early as possible. AppModule.shouldProcessUIAPropertyChangedEvent has been introduced to facilitate this.
Contributor
Author
|
Updated to only reject property changes that are actually flooded (name, item status, enabled). |
Contributor
|
Hello,
I've proposed some sort of UIA NVDA object caching mechanism to attack
this issue, because UIA fires too much events in complex applications
like Visual Studio.
Cheers,
…--
Cuando tus fuerzas terminan, las de mi Dios comienzan.
|
feerrenrut
approved these changes
Apr 16, 2020
feerrenrut
left a comment
Contributor
There was a problem hiding this comment.
This looks fine to me. @jcsteh Would you like me to wait for a review from @michaelDCurran before merging?
Contributor
Author
|
Thanks, @feerrenrut! Please go ahead and merge. |
derekriemer
reviewed
Apr 18, 2020
| Returning False will cause the event to be dropped completely. This can be | ||
| used to work around UIA implementations which flood events and cause poor | ||
| performance. | ||
| Returning True means that the event will be processed, but it might still |
Collaborator
There was a problem hiding this comment.
can you briefly describe what these params mean so I can send a followup to document them?
Contributor
Author
|
Sorry. I figured anyone wanting to mess with UIA events at this low level would already understand what these were based on the UIA interfaces, so I didn't see the need to document them. However, I probably should've documented them regardless. :) sender is the raw UIA element sending the event. propertyId is the raw UIA property id for the property which changed.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #10508.
Summary of the issue:
When moving between items in the list in 1Password, response is extremely sluggish, frequently taking over a second to report the newly selected item.
Description of how this pull request fixes the issue:
1Password floods property change events whenever you move between items in the list. Because NVDA listens to all property changes and instantiates NVDAObjects in most cases, this causes severe sluggishness.
To work around this, drop all property change events from 1Password as early as possible. AppModule.shouldProcessUIAPropertyChangedEvent has been introduced to facilitate this.
Testing performed:
Moved through items in the 1Password list with the down arrow key. Observed that response is much faster.
Known issues with pull request:
This is somewhat of a hack. 1Password shouldn't be flooding these events. That said, Narrator and JAWS aren't impacted like NVDA is and there are certainly improvements that could be made to NVDA's UIA event handling. For now, this is the most effective solution without significant refactor/re-architecture of UIA event handling.
Change log entry:
Bug fixes:
- NVDA is no longer extremely sluggish when moving within the list of items in 1Password. (#10508)