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:
+1
-1
@@ -40,7 +40,7 @@ image = { version = "0.25", default-features = false, features = ["jpeg", "png",
|
||||
kamadak-exif = "0.5"
|
||||
md-5 = "0.10"
|
||||
sha2 = "0.10.9"
|
||||
blake3 = { version = "1.8.3", features = ["rayon"] }
|
||||
blake3 = { version = "1.8.3", features = ["rayon", "mmap"] }
|
||||
hex = "0.4.3"
|
||||
http-body-util = "0.1.3"
|
||||
percent-encoding = "2.3"
|
||||
|
||||
Reference in New Issue
Block a user