Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bc666bea authored by Daniel Norman's avatar Daniel Norman
Browse files

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
parent 60bb7c9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment