Commit 2fd33fc443324dad355619dbc2686684cb6d1e91

Roman Lavrov 2023-07-17T17:07:52

Android: Make .gz sync faster by only checking last bytes In particular, some angledata.gz are hundreds of megabytes, which results in multiple seconds spend on some traces which adds up to a few minutes when running all traces. Gzip format includes an 8-byte trailer with the CRC-32 and the length of the uncompressed data https://en.wikipedia.org/wiki/Gzip#File_format Instead of checking hash(file) check hash(tail(file)). Check more than just 8 bytes (arbitrarily picked 4096) so that in a rare event of a collision we're still likely to see different bytes as compressed streams tend to diverge when data changes. This reduces the already-fully-synced sync from ~130s to ~60s in my tests. Bug: b/276742336 Change-Id: I899b80ac90ef4def498c8cb52d6b096d8b1ef826 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4691962 Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Cody Northrop <cnorthrop@google.com>