perf: replace SHA-256 with BLAKE3 + add mimalloc global allocator

- Replace SHA-256 with BLAKE3 (~5x faster) for content-addressable hashing
  in dedup_service, file_handler, file_upload_service, chunked_upload_service
- Add mimalloc as global allocator for 10-30% throughput improvement
- sha2 crate retained only for PKCE (OAuth2 standard requirement)
- BLAKE3 produces 64-char hex hashes (same format), no DB schema changes needed
This commit is contained in:
Dionisio
2026-03-01 21:47:39 +01:00
parent 81987e9321
commit e2fb29ea60
10 changed files with 88 additions and 34 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ pub trait FileReadPort: Send + Sync + 'static {
/// Gets the content-addressable blob hash for a file (O(1) DB lookup).
///
/// Returns the SHA-256 hash stored in `storage.files.blob_hash`.
/// Returns the BLAKE3 hash stored in `storage.files.blob_hash`.
/// Used for dedup reference tracking without loading file content.
async fn get_blob_hash(&self, file_id: &str) -> Result<String, DomainError>;