summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author Yi-Yo Chiang <yochiang@google.com> 2022-03-28 15:58:50 +0800
committer Yi-Yo Chiang <yochiang@google.com> 2022-03-29 14:55:49 +0800
commit8d629110c4e9b0ad074a7f1e355e92a3b73b855f (patch)
treeeaaa59c1b30aaec9bb29af038e38d246bd697839 /libs/androidfw/ObbFile.cpp
parent952326b9cfaca85325573c068f53ef19c5442b24 (diff)
DSU service: Pipeline the installation task to improve performance
Right now the installation task does roughly this: while (has partition data left) { a. Copy partition data to write buffer. b. Copy write buffer to shared memory. c. Binder call submitFromAshmem() to inform the consumer of the shared memory. } Both task (a) and (c) are I/O intensive and time consuming operations. However (a) and (c) don't have a strong data dependency, and the only consistency condition we need to maintain is "task (b) can only be started once task (c) from the previous iteration is complete." As soon as (b) is complete, (c) and *(a) of the next iteration* can be started, pipelining task (a) & (c). Also enlarge the default shared memory size because there are new improvements after this change. The new default size (512K) is chosen somewhat randomly, it's large enough to optimize the installation time and small enough to not starve most devices' RAM. Speedup: * physical device: 23s -> 18s (14s if shared memory buffer is 512K) * virtual device: 19s -> 15s Bug: 225310919 Test: Install and boot DSU Change-Id: If7093919762861d19d4fecaf997a699cc1b0fe41
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions