Open Bug 1960504 Opened 5 months ago Updated 5 months ago

Consider avoiding firing events which are not required by listening clients

Categories

(Core :: Disability Access APIs, enhancement)

enhancement

Tracking

()

People

(Reporter: Jamie, Unassigned)

References

(Blocks 2 open bugs)

Details

In bug 1794974, we implemented caching granularity, whereby we don't include cache domains in the cache unless a client queries for information in those domains. This improves performance and memory usage. However, because events are generated in the content process and the content process has a full tree, we still fire all events to clients, even for domains which aren't in the cache yet. This causes problems like bug 1959892 and bug 1916578, where firing these events can itself request domains. We should consider not firing events at all where those events are related to domains that aren't yet active.

By itself, this solution wouldn't entirely fix events requesting cache domains. For example, in order to work out whether to fire a live region event, UIA performs some extra checks on core text inserted, text removed and name change events. I guess we might be able to solve that by making live region events a core event instead (bug 1924158), but this might be tricky due to different requirements on different operating systems. There might be other examples as well. Also, I don't think we could get rid of show and hide events, which are perhaps the vast majority of events we fire. Still, this might be worth investigating and considering.

You need to log in before you can comment on or make changes to this bug.