Skip to content

Replace serde_json with postcard for cache serialization#14

Merged
jserv merged 1 commit intomainfrom
cache
Feb 11, 2026
Merged

Replace serde_json with postcard for cache serialization#14
jserv merged 1 commit intomainfrom
cache

Conversation

@jserv
Copy link
Copy Markdown
Owner

@jserv jserv commented Feb 11, 2026

Switch cache entry encoding from JSON to postcard binary format. Postcard uses varint encoding, producing more compact entries by eliminating JSON field names and syntax overhead. This increases effective cache capacity within the same max_size_mb limit.

Legacy JSON entries are automatically evicted on first access (deserialization failure triggers db.remove), avoiding dead weight in the sled database.

Switch cache entry encoding from JSON to postcard binary format.
Postcard uses varint encoding, producing more compact entries by
eliminating JSON field names and syntax overhead. This increases
effective cache capacity within the same max_size_mb limit.

Legacy JSON entries are automatically evicted on first access
(deserialization failure triggers db.remove), avoiding dead weight
in the sled database.
@jserv jserv merged commit 511ea60 into main Feb 11, 2026
5 checks passed
@jserv jserv deleted the cache branch February 11, 2026 13:32
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.40%. Comparing base (2616bee) to head (7665dc8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/cache.rs 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #14      +/-   ##
==========================================
- Coverage   68.48%   68.40%   -0.09%     
==========================================
  Files          11       11              
  Lines         768      769       +1     
==========================================
  Hits          526      526              
- Misses        242      243       +1     
Flag Coverage Δ
unittests 68.40% <66.66%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/cache.rs 59.59% <66.66%> (-0.61%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant