summaryrefslogtreecommitdiff
path: root/tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
diff options
context:
space:
mode:
authorNoah Zimmt <noahz@google.com>2019-07-25 16:15:06 -0700
committerNoah Zimmt <noahz@google.com>2019-08-05 11:25:22 -0700
commitb25580718908af3f8295f29479f24979fcc2fe8e (patch)
tree8b5b7cec0d7b4e26fa4475f0be0c6a7eb77be145 /tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp
parent44a27da934a67a2e52760ffadd0323a4c8224e63 (diff)
Avoid calling installd where not needed
The method StorageStatsManager#getCacheBytes is called several times during package installation. It calls InstalldNativeService::getUserSize via a binder call. The runtime of getUserSize is variable; I have traces where it takes 50ms and traces where it takes 500ms. The return value of getUserSize used to take into account freeable cache space when determining available space on a given volume. In most cases, it is possible to first do a pessimistic check of the space available on the volume - forgoing the installd call - and only consider cache space if the pessimistic check fails. This avoids a binder call + the time spend in getUserSize for most installs. Bug: None Test: atest frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java cts/tests/tests/os/src/android/os/storage/cts/StorageManagerTest.java Change-Id: Icaecee732ef330fee1b409d2dd76723822c25959
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests/src/cpp/test_executable.cpp')
0 files changed, 0 insertions, 0 deletions