Skip to content

loro-crdt@1.13.7

Choose a tag to compare

@github-actions github-actions released this 15 Jul 06:41
664687f

Patch Changes

  • 3986805: Speed up snapshot import. When decoding a Loro snapshot, the redundant per-block SSTable validation (eager block-metadata decode and per-block checksums) is now skipped, because the whole snapshot body is already protected by the document-level checksum verified during decoding. This removes a second hash pass over the data (roughly halving B4 snapshot import time) while preserving integrity guarantees.

    This fast path is internal to Loro's snapshot decoding. The public MemKvStore::import_all still verifies every block's checksum; a separate import_all_unchecked opts into the unchecked path and is only used where an outer checksum already guarantees integrity.

  • 9b6330d: Speed up local text editing (~35% faster on the B4 editing trace). Three hot-path
    changes: the lock-order debug instrumentation is now compiled out of release
    builds (it ran on every per-op lock acquisition); the visible-op count is bumped
    incrementally for local ops instead of recomputing it from the version vectors
    (which also allocated) on every op; and a couple of per-op allocations on the
    text insert/delete path were removed (lazy error-context formatting and inline
    storage for entity ranges).

  • c37e76a: Fix a checkout hang after snapshot import. Change-store blocks decoded from a snapshot recorded a wrong end lamport (lamport_range.1 was set to the start lamport of the block's last change instead of its end). When a change was split across multiple blocks and a lamport-based lookup engaged the binary search path in ChangeStore::get_change_by_lamport_lte — e.g. the movable-list diff calculator resolving historical positions during checkout — the degenerate range made the search loop forever. The binary search now also caps its steps and falls back to a scan if it ever fails to converge; the fallback considers both unflushed in-memory blocks and the underlying kv store, so lamport lookups (e.g. getChangeAtLamport) stay correct for local changes that have not been flushed yet.