Skip to content
Commit 43f3af7e authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Optimizing getUnsuspendablePackages

Test: atest GtsSuspendAppsTestCases

Locally with 274 packages, I plugged in StatLogger:
Before the change:
  Stats:
    getUnsuspendablePackages: count=105, total=18679.5ms, avg=177.900ms, max calls/s=2 max dur/s=226.0ms max time=214.1ms
    getActiveLauncher: count=28392, total=9856.3ms, avg=0.347ms, max calls/s=946 max dur/s=308.0ms max time=5.1ms
    getDialer: count=28080, total=160.3ms, avg=0.006ms, max calls/s=0 max dur/s=0.0ms max time=1.3ms

After the change:
  Stats:
    getUnsuspendablePackages: count=104, total=7193.4ms, avg=69.167ms, max calls/s=21 max dur/s=1459.0ms max time=105.8ms
    getActiveLauncher: count=127, total=138.2ms, avg=1.088ms, max calls/s=11 max dur/s=16.0ms max time=2.0ms
    getDialer: count=127, total=4.2ms, avg=0.033ms, max calls/s=0 max dur/s=0.0ms max time=0.9ms

Fixes: 120908380
Change-Id: I4554fa7e3b72dfd5d66ad63fdf51528537d686b4
parent 47bfb774
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