Skip to content

Drop UIA property change events in 1Password to fix poor performance.#11011

Merged
feerrenrut merged 1 commit into
nvaccess:masterfrom
jcsteh:1passwordPerf
Apr 17, 2020
Merged

Drop UIA property change events in 1Password to fix poor performance.#11011
feerrenrut merged 1 commit into
nvaccess:masterfrom
jcsteh:1passwordPerf

Conversation

@jcsteh

@jcsteh jcsteh commented Apr 15, 2020

Copy link
Copy Markdown
Contributor

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)

@jcsteh jcsteh requested a review from michaelDCurran April 15, 2020 12:13
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.
@jcsteh

jcsteh commented Apr 15, 2020

Copy link
Copy Markdown
Contributor Author

Updated to only reject property changes that are actually flooded (name, item status, enabled).

@francipvb

francipvb commented Apr 16, 2020 via email

Copy link
Copy Markdown
Contributor

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks fine to me. @jcsteh Would you like me to wait for a review from @michaelDCurran before merging?

@jcsteh

jcsteh commented Apr 16, 2020

Copy link
Copy Markdown
Contributor Author

Thanks, @feerrenrut! Please go ahead and merge.

@feerrenrut feerrenrut merged commit 172e71b into nvaccess:master Apr 17, 2020
@nvaccessAuto nvaccessAuto added this to the 2020.1 milestone Apr 17, 2020
@feerrenrut feerrenrut modified the milestones: 2020.1, 2020.2 Apr 17, 2020
feerrenrut added a commit that referenced this pull request Apr 17, 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you briefly describe what these params mean so I can send a followup to document them?

@jcsteh

jcsteh commented Apr 18, 2020 via email

Copy link
Copy Markdown
Contributor Author

@jcsteh jcsteh deleted the 1passwordPerf branch May 1, 2020 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NVDA very sluggish when navigating 1password for windows desktop

5 participants