0
Files
src/content/test
Ahmed Elwasefi eafa5f8917 [a11y] Serialize scroll changes with location changes in the fast pipeline.
In the old code, when a node scrolled, it was marked dirty and therefore triggered a full serialization. However, because scroll offsets can change many times per second, the new code leverages the very lightweight location change serialization path as follows:
1. AXObjectCacheImpl is notified of a scrolled node in HandleScrollPositionChanged()
2. InvalidateBoundingBox is called for the scrolled node to mark at as pending checks.
3. In ProcessDeferrerAccessibilityEvents(), SerializeLocationChanges is called which now does additional checks on scroll values and serialize scroll values along with location changes if they changed.

-----------------------

Improvements on running perf-tests of scrolling (location-changes-*):
- RenderAccessibilityImpl::SendPendingAccessibilityEvents
  - From around 70ms to 0ms. This is because full serialization no longer used.
- BrowserAccessibilityManager::OnAccessibilityEvents
  - From 5ms to 0ms
- GetUpdatesAndEventsForSerialization
  - From 6-7ms to 0ms
Total Decrease: 81ms

- BrowserAccessibilityManager::OnLocationChanges
  - Since location updates now include scrolling, this increased from 0ms to 0.5ms
- SerializeLocationChanges
  - From 0ms to 2ms
Total Increase: 2.5ms

Thus, we can say that net improvement/decrease is 96.9% of original time.

NOTE: the perf results are copied from the older CL which was reverted but the logic is the same.


Change-Id: Ida319814aa92136ea52c546cf581d7e09798d86c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5878051
Reviewed-by: Aaron Leventhal <aleventhal@chromium.org>
Commit-Queue: Ahmed Elwasefi (Ahmad45123) <a.m.elwasefi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1362563}
2024-10-01 18:30:17 +00:00
..
2024-10-01 18:27:09 +00:00