AccessibilityNodeInfo caching for Android performance improvement
This CL expands on our work of improving the performance of accessibility features on Android. Here we create a SparseArray<AccessibilityNodeInfo> to store a mapping of view ids to their corresponding AccessibilityNodeInfo objects. When the system asks us to create a new object for that view, we leverage the object stored in our array (cache) rather than constructing one from scratch. There are helper methods so the native code can drive clearing the cache at appropriate times. We are clearing the cache on a given node during OnDataChanged or during OnNodeWillBeDeleted. Change-Id: Iaf817886b8d7038d268d4b459d135c46f60cbfff Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2080857 Commit-Queue: Mark Schillaci <mschillaci@google.com> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#747861}
Showing
Please register or sign in to comment