Skip to content
Commit e7e43738 authored by Alex Buynytskyy's avatar Alex Buynytskyy
Browse files

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
parent a5c57af8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment