Skip to content

Ignore redundant winEvents proxied from UIA on EXCEL7 windows#11818

Merged
michaelDCurran merged 1 commit into
masterfrom
excel_ignoreWinEventsFromUIA
Nov 9, 2020
Merged

Ignore redundant winEvents proxied from UIA on EXCEL7 windows#11818
michaelDCurran merged 1 commit into
masterfrom
excel_ignoreWinEventsFromUIA

Conversation

@michaelDCurran

Copy link
Copy Markdown
Member

Link to issue number:

None

Summary of the issue:

when the selection / focus moves between cells on an Excel sheet (EXCEL7 window), Excel's UI Automation implementation fires appropriate selection / focus events. Although there is separate work to support Excel in NvDA via UI automation, at the moment Excel is supported via its object model and MSAA. But, as Excel fires these UI Automation events, Windows proxies them to MSAA winEvents. Not only do we have no use for them as we handle selection / focus tracking in Excel cells entirely with the keyboard, these winEvents are broken in that trying to fetch an IAccessible object from them always fails, but more importantly, fetching, and checking if the winEvent should be dropped as it in deed did come from UIA causes a freeze of several seconds on some machines.

I am unable to reproduce the freeze myself, but can at least see the redundant events.

The user who reported this via email was running Windows 10.0.17763 and Office  365 MSO (16.0.11929.20966) 32-bit.

Description of how this pull request fixes the issue:

Simply ignore all winEvents from EXCEL7 windows with an objectID greater than 0 as these are all proxied from UI Automation and we do not expect or need them.
We actually only expect a focus winEvent when the sheet gets focus, and anything else is not expected as historically Excel never fired any more winEvents than that. Thus all the winEvents now coming from its UI Automation implementation are redundant and cause a performance hit.

Testing performed:

Tested Excel locally by moving selection / focus between cells with the arrow keys and made sure that NVDA still reported the cells.
Provided multiple try builds to the user to test, and they reported that the freezes disappeared for them.

Known issues with pull request:

None.

Change log entry:

Bug fixes:

  • A freeze of several seconds experienced by a small amount of users when arrowing between cells in Excel should no longer occur.

…e generated by UI Automation and can freeze NVDA on some systems.

@LeonarddeR LeonarddeR left a comment

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.

Aren't these supposed to be dropped by us changing the UIA proxy factory mapping to ignore proxied win events?events prox

@michaelDCurran

michaelDCurran commented Nov 9, 2020 via email

Copy link
Copy Markdown
Member Author

@LeonarddeR

LeonarddeR commented Nov 9, 2020 via email

Copy link
Copy Markdown
Collaborator

@michaelDCurran michaelDCurran merged commit 18572e4 into master Nov 9, 2020
@michaelDCurran michaelDCurran deleted the excel_ignoreWinEventsFromUIA branch November 9, 2020 22:19
@nvaccessAuto nvaccessAuto added this to the 2020.4 milestone Nov 9, 2020
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.

3 participants