aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-common/src/meshbay_common
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-08 01:27:58 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-08 01:27:58 +0200
commitc27e04c88557716bbe8e42b9174ba9b07f90facf (patch)
treea1a56edbede2bba9bb0cc99b81b98570b8313915 /packages/meshbay-common/src/meshbay_common
parentcdd5fd52e981c4c59643e7dee705b6c55acae68e (diff)
downloadmeshbay-c27e04c88557716bbe8e42b9174ba9b07f90facf.tar.gz
perf(node): sample 9 MB with the size above 9 MB, keep known ids0.19
hash_version 3: size + first 4 MB + last 4 MB + 1 MB at the middle, 5.5x faster cold on a USB disk than the 45 MB sample. The cache now serves a hit under whatever version it holds, so no existing id moves. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-common/src/meshbay_common')
-rw-r--r--packages/meshbay-common/src/meshbay_common/protocol.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/meshbay-common/src/meshbay_common/protocol.py b/packages/meshbay-common/src/meshbay_common/protocol.py
index f8e56ec..c048b8d 100644
--- a/packages/meshbay-common/src/meshbay_common/protocol.py
+++ b/packages/meshbay-common/src/meshbay_common/protocol.py
@@ -281,7 +281,7 @@ class IndexEntry:
track_no: int | None = None # tag or parsed, Music app
taken_at: int | None = None # unix timestamp, EXIF DateTimeOriginal — Photos app
camera: str | None = None # "Make Model", when both present — Photos app
- hash_version: int = 1 # 1 = full-file blake3, 2 = partial-read (45 MB sample)
+ hash_version: int = 1 # 1 = full-file blake3, 2 = 45 MB sample, 3 = size + 9 MB sample
def index_entry_wire(e: IndexEntry) -> dict: