openSUSE-Rust / obs-service-cargo

OBS Source Service and utilities for Rust software packaging
Mozilla Public License 2.0
19 stars 9 forks source link

Use blake3 for comparing files #110

Closed Pi-Cla closed 5 days ago

Pi-Cla commented 6 days ago

If we use hashing only to figure out if two files are the same then blake3 is very fast and preferred over sha2. See: https://github.com/BLAKE3-team/BLAKE3

Pi-Cla commented 6 days ago

Looking at the CI it seems blake3 has slightly sped it up: Before: 269.46s After: 265.45s 2nd After: 265.87s

So most of the time is being used in other parts of the program.

But still worth it especially when no one has shown a major attack against this hashing algorithm in the years since it was first published in 2021.

@uncomfyhalomacro and @Firstyear for thoughts

Firstyear commented 5 days ago

Seems fine to me :)

uncomfyhalomacro commented 5 days ago

wooops. i just updated and pushed and didn't see this PR