Stop event floods if possible
The problem: Some applications (native and web) are super event-spammy. Two that spring to mind:
- Discord in (at least) Chromium and Electron floods Orca with text-changed events
- gnome-disk-utility spews out state-changed:showing (along with some other events)
Orca tries to catch event floods and minimize processing time. But unless Orca completely unregisters for the event types(s), waits until the flood is (hopefully) over, and re-registers, things will still be laggy and may grind to a complete halt. :(
While the best, most correct solution is for applications to stop spamming ATs, I think a work around might be for AT-SPI2 to catch this condition happening -- at the bridge if possible -- on a per app basis. In other words, if Discord is all text-event spammy, don't send text-change events from Discord over dbus until the spam has died down.
Does this a) make sense and b) seem doable?