diff options
author | Amith Yamasani <yamasani@google.com> | 2020-05-29 15:20:18 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2020-06-18 16:43:25 -0700 |
commit | 62b19914af318a3ed2b9cce329b8fd83ef4acbef (patch) | |
tree | df8a41e096defb70872d49ae61ea623a0e99af3c /tools/aapt2/java/JavaClassGenerator.cpp | |
parent | cd259caf54f903245a98eda557af147103f9bc87 (diff) |
Speed up NetworkPolicy thread during user creation
Network Policy Manager makes a ton of calls to
UsageStats.isAppIdle, which in turn tries to get
the network scorer and results in a lot of calls to
PackageManager. Caching the network scorer reduces a
lot of the lock contention with PackageManager.
Also, caching calls to check for an app's internet
permission.
Handler for USER_ADDED broadcast reduced in wallclock
duration from 2+ seconds to 114ms.
Bug: 156582823
Test: atest UserLifecycleTests#createAndStartUser
Test: atest AppStandbyTests
Change-Id: I369f9c129ca8a13016e00b1bec2776111fa04513
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions