oficina / docs Public

worktree-snapshots

Snapshots: a document no longer stops accepting edits at 4096 updates.

The Rust core encodes a whole document as one Yjs update and verifies a candidate; the store writes one every 256 updates, taken from the replayed state before the incoming update is applied; replay and the update endpoint both read snapshot-then-tail; the browser gets a raw=1 escape hatch for a snapshot that will not decode.

Replay of 4000 rows: 3.55ms with a snapshot, 71.10ms without. Also removes the constraint that forces the 2s save debounce, which is the next change.

Commits 18
Files changed 21 +3933 −113
Discussions 1 0 open
Tasks 1/4 done

Discussions 0 open

  • No discussions on this branch yet.

Tasks 1/4 done

  • Test verify_snapshot's delete-set arm — no fixture contains a deletion, so the state-vector arm always discriminates first Not started
  • Shorten DEBOUNCE_MS now that snapshots make it affordable — the change a person actually feels Done
  • replay still materialises the whole log slice before applying — bounded handle memory, unbounded slice; belongs with the compaction horizon Not started
  • Comment pass: four stale comments in abi.rs, store.go, core.go and tests/snapshot.rs Not started

Activity