Tweak buffer size for APK checksumming.
Benchmark to calculate SHA256 over 1GB file: 4K: 1529542318 8K: 1101879125 16K: 989211442 32K: 783037993 ~20.8% 64K: 742122399 ~5.2% 128K: 723034565 ~4.2% 256K: 716748703 ~0.8% 512K: 718178800 ~-0.2% 1M: 719738817 128K seems to be the sweet spot, with 256K being only marginally better and 512K is worse. Bug: 196253439 Fixes: 196253439 Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest Change-Id: I502e42652ed78f3eb843edc49d0b486552231a15
Loading
Please register or sign in to comment