Skip to content

Encode atomic JSON once with compact default output - #31

Merged
trissim merged 2 commits into
mainfrom
perf/atomic-json-single-encoding-20261008
Oct 8, 2026
Merged

trissim merged 2 commits into
mainfrom
perf/atomic-json-single-encoding-20261008

Conversation

@trissim

@trissim trissim commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Atomic JSON metadata updates now encode once with the stdlib encoder and write once, defaulting to compact JSON while preserving explicit indentation. The existing atomic owner retains lock/read/update/fsync/replace semantics and cleans up its temporary files when writes or replacement fail.

Closes #30.

Validation:13 focused atomic/lock checks pass, including parsed nested/unicode values, explicit formatting, transform/lock release, and encoding/fsync/replacement/update failures preserving the original file. Ruff, Black and diff checks pass.

A single saved genuine OpenHCS fixed12 Track metadata replay measured109.97ms→23.14ms for atomic parse/identity-update/write. This excludes projection/reconciliation, uses a standalone diagnostic pair, and is not an end-to-end benchmark claim. Default whitespace changes; explicit indent=2 preserves human-readable output.

Closes #30. Default to compact parsed-equivalent metadata while retaining explicit indentation, locks, fsync and atomic replacement.
Copilot AI balanced review requested due to automatic review settings October 8, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim merged commit 3938236 into main Oct 8, 2026
3 of 11 checks passed
@trissim
trissim deleted the perf/atomic-json-single-encoding-20261008 branch October 8, 2026 13:14
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.

Atomic JSON metadata writes repeat Python encoder work

2 participants