feat: cache parsed member indexes as msgpack to skip YAML re-parse on rebuild #40
Reference in New Issue
Block a user
Delete Branch "benvin/issue-36-msgpack-member-cache"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #36
Summary
index.yaml(from upstream or S3), the handler now parses it and stores a compact msgpack file (index.msgpack) alongside the raw YAML in S3_entries_to_msgpack_safe()converts datetime/date objects to ISO strings before packing (msgpack cannot natively serialize Python datetimes)_merge_helm_indexes()acceptslist[dict | None]as pre-parsed entries; falls back to raw YAML parse when msgpack is unavailable_VirtualHandler.merge()protocol updated to pass pre-parsed entries to all future handler implementationsPerformance
Phase breakdown (19-member helm-all virtual, 14 MB total):
Log line confirms msgpack hits:
msgpack=19/19Test plan
TestEntriesToMsgpackSafe: datetime/date serialization, empty input, round-tripTestMergeHelmIndexesWithParsed: pre-parsed path produces identical output to raw-bytes pathTestGetMemberIndexMsgpack: msgpack hit, cold-build, broken msgpack fallback, upstream failure