summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorFyodor Kupolov <fkupolov@google.com>2016-06-30 14:48:22 -0700
committerFyodor Kupolov <fkupolov@google.com>2016-06-30 14:49:48 -0700
commit5e57a20c09512c676bc1ac938c5a2516ba260f72 (patch)
tree35e614276fa9efcbe3ff8583cb5ba395d1d8d116 /tools/aapt2/diff/Diff.cpp
parent7877b8add811aafd7f57f731c8e22c9fe6a319c8 (diff)
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
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions