aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2016-04-20 10:21:34 -0500
committerandroid-build-merger2016-04-20 10:21:34 -0500
commit1864feb8d2ab6f764d377df28613a973927d85e8 (patch)
tree7d2605c3f1b0cb984bb6984f58c5fe38b846b209 /verifier.cpp
parent0231e7016dfe56625d6d01a1de468cd23d9cf01a (diff)
parentdd895d0adaa691a078f18a95a7f5ac0eaf776cae (diff)
downloadplatform-bootable-recovery-1864feb8d2ab6f764d377df28613a973927d85e8.tar.gz
platform-bootable-recovery-1864feb8d2ab6f764d377df28613a973927d85e8.tar.xz
platform-bootable-recovery-1864feb8d2ab6f764d377df28613a973927d85e8.zip
Decrease OTA package verification times further.
am: dd895d0 * commit 'dd895d0adaa691a078f18a95a7f5ac0eaf776cae': Decrease OTA package verification times further. Change-Id: If3bee4cbe66e576193556472776a232c9460af9a
Diffstat (limited to 'verifier.cpp')
-rw-r--r--verifier.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/verifier.cpp b/verifier.cpp
index a2ef946b..52399056 100644
--- a/verifier.cpp
+++ b/verifier.cpp
@@ -207,10 +207,10 @@ int verify_file(unsigned char* addr, size_t length,
207 double frac = -1.0; 207 double frac = -1.0;
208 size_t so_far = 0; 208 size_t so_far = 0;
209 while (so_far < signed_len) { 209 while (so_far < signed_len) {
210 // On a Nexus 9, experiment didn't show any performance improvement with 210 // On a Nexus 5X, experiment showed 16MiB beat 1MiB by 6% faster for a
211 // larger sizes past 1MiB, and they reduce the granularity of the progress 211 // 1196MiB full OTA and 60% for an 89MiB incremental OTA.
212 // bar. http://b/28135231. 212 // http://b/28135231.
213 size_t size = std::min(signed_len - so_far, 1 * MiB); 213 size_t size = std::min(signed_len - so_far, 16 * MiB);
214 214
215 if (need_sha1) SHA1_Update(&sha1_ctx, addr + so_far, size); 215 if (need_sha1) SHA1_Update(&sha1_ctx, addr + so_far, size);
216 if (need_sha256) SHA256_Update(&sha256_ctx, addr + so_far, size); 216 if (need_sha256) SHA256_Update(&sha256_ctx, addr + so_far, size);