perf: write-through in-memory cache for tracker JSON reads

All _load() calls after the first return the cached dict instead of
re-reading disk. _save() updates both disk and cache atomically.
Drops per-person tracker reads from ~90 to ~1 in the upload loop.
Keyed by resolved file path so test isolation (unique tmp_path dirs)
is preserved with no fixture changes needed.
This commit is contained in:
2026-06-14 04:08:28 +00:00
parent 7dce4a5c71
commit d79e113c96
3 changed files with 25 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "winnow"
version = "0.4.7"
version = "0.4.8"
description = "Selects diverse, high-quality photos from Immich as training data for Frigate face recognition and object classification."
license = "AGPL-3.0-or-later"
requires-python = ">=3.13"