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

Skip to content
Commit 5e57a20c authored by Fyodor Kupolov's avatar Fyodor Kupolov
Browse files

Performance optimizations in generatePackageInfo

In PM.generatePackageInfo, granted permissions (returned by permissionsState.
getPermissions) are only used if the package has a non-empty list of
requested permissions. Added a shortcut to handle that. In my tests
this shortcut is triggered in ~20% calls to PM.generatePackageInfo.

Also added an early continue in PermissionsState.getPermissions. Calling
hasRuntimePermission was not necessary in 90% cases.
Also changed ArraySet to be created with capacity for all mPermissions --
this is the typical scenario, previously it was going through multiple
grow operations.

Bug: 29879962
Change-Id: Ic4d8914d1c4f4df447deee2e3e3a15a2594e90ef
parent 7877b8ad
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