perf: use blake3 mmap_rayon for file hashing — zero heap allocation
- Replace std::fs::read() + update_rayon() with update_mmap_rayon() for file hashing, eliminating full-file heap allocation (500MB file no longer needs 500MB of RAM to hash) - Enable blake3 'mmap' feature in Cargo.toml - Lower hash_bytes rayon threshold from 10MB to 128KB - Remove dead constants HASH_BLOCK_SIZE and RAYON_HASH_THRESHOLD
This commit is contained in:
Generated
+10
@@ -278,6 +278,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"constant_time_eq",
|
||||
"cpufeatures",
|
||||
"memmap2",
|
||||
"rayon-core",
|
||||
]
|
||||
|
||||
@@ -1608,6 +1609,15 @@ version = "2.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
||||
|
||||
[[package]]
|
||||
name = "memmap2"
|
||||
version = "0.9.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mimalloc"
|
||||
version = "0.1.48"
|
||||
|
||||
Reference in New Issue
Block a user