Avoid enqueuing extra deferred accessibility updates for the same node
When a node's children have changed, accessibility code enqueues information about that in order to examine the accessibility tree after layout is clean. However, under some circumstances that led to enqueuing the same node over and over again. Fix that by adding a set to keep track of nodes already in the queue. This patch also adds tracing for AXObjectCacheImpl::ProcessDeferredAccessibilityEvents and adds a new perf test to track this optimization. I'm seeing a ~20x speedup. Bug: 1107988 Change-Id: I1263c5139991287a35b89c9c0e6e021f07628c17 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340384 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:Adam Ettenberger <Adam.Ettenberger@microsoft.com> Reviewed-by:
Koji Ishii <kojii@chromium.org> Reviewed-by:
Aaron Leventhal <aleventhal@chromium.org> Cr-Commit-Position: refs/heads/master@{#795571}
Showing
Please register or sign in to comment