summaryrefslogtreecommitdiff
path: root/libs/androidfw/ResourceTimer.cpp
diff options
context:
space:
mode:
author Daniel Norman <danielnorman@google.com> 2022-08-16 16:45:09 -0700
committer Daniel Norman <danielnorman@google.com> 2022-08-23 20:41:02 +0000
commitbc666bea023c74e62827e93b809e6ea632ff2494 (patch)
treed532ee22a046cab84af240f671f80487ffa006ce /libs/androidfw/ResourceTimer.cpp
parent60bb7c9bcad97b0048e1cb1906df70ff8a2e8bd5 (diff)
Tweak behavior of isAccessibilityDataPrivate() to reduce CPU usage.
Changes: - Cache the value of isAccessibilityDataPrivate(). - Change callers to check if the a11y service isAccessibilityTool first where possible, to prevent unnecessary calls to isAccessibilityDataPrivate() for "happy use case" users (anyone not using a non-a11y-tool). Using simpleperf during UI benchmark test, % of CPU in frameworks.jar from isAccessibilityDataPrivate(): - before: 71.6% ( :O ) - after: 0.25% Bug: 242267091 Test: atest com.android.uibench.microbenchmark.UiBenchBrowseContentScrollNoBitmapUploadMicrobenchmark#testBrowseContentScrollNoBitmapUpload Change-Id: Ie0c89c2fb893be1c7347a0acfb0ede0993034ee6
Diffstat (limited to 'libs/androidfw/ResourceTimer.cpp')
0 files changed, 0 insertions, 0 deletions