diff options
author | Patrick Baumann <patb@google.com> | 2020-05-27 16:39:45 -0700 |
---|---|---|
committer | Patrick Baumann <patb@google.com> | 2020-06-16 11:46:14 -0700 |
commit | 0192f737ffa347dee67129938d0133b573d72c5c (patch) | |
tree | 2ddeb302abdcb5e6b4f6c2e07b66b34549118134 /rs/java/android/renderscript/ProgramVertexFixedFunction.java | |
parent | 50886ed9a27dde0eb5aa2c76c21e0e90fcee3f41 (diff) |
Pre-cache filter results
This change adds a cache layer for the return of
shouldFilterApplicationInternal in AppsFilter. This cuts most operations
that rely on app filtering nearly in half by removing a good deal of
branching that used to exist on the critical path for a crosshatch.
Before this CL:
android.os.PackageManagerPerfTest#testGetApplicationInfoWithFiltering:
getApplicationInfoWithFiltering_mean: 983719
getApplicationInfoWithFiltering_standardDeviation: 120061
getApplicationInfoWithFiltering_median: 1061674
getApplicationInfoWithFiltering_min: 827489
android.multiuser.UserLifecycleTests#createAndStartUser:
Mean (ms): 4243.10
After this CL:
android.os.PackageManagerPerfTest#testGetApplicationInfoWithFiltering:
getApplicationInfoWithFiltering_mean: 426340
getApplicationInfoWithFiltering_standardDeviation: 18861
getApplicationInfoWithFiltering_median: 427002
getApplicationInfoWithFiltering_min: 407887
android.multiuser.UserLifecycleTests#createAndStartUser:
Mean (ms): 3387.25
Note: this is a 2nd attempt at this change that fixes a few from the
previous at ag/11622391. This works with multi-user and updates tests to
ensure this stays true. It also improves peformance when building the
cache by pre-allocating the SparseBooleanArrays to their max sizes.
Test: atest AppEnumerationTests AppsFilterTest PackageManagerPerfTests
Fixes: 150405193
Change-Id: I6e0446068f46af0f22e0259ab7b6cdbbc7e08a22
Merged-In: I6e0446068f46af0f22e0259ab7b6cdbbc7e08a22
Merged-In: I67969ee2dec7a70442d2bea43c99fba977ee33f4
Diffstat (limited to 'rs/java/android/renderscript/ProgramVertexFixedFunction.java')
0 files changed, 0 insertions, 0 deletions