loro-crdt@1.13.7
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_allstill verifies every block's checksum; a separateimport_all_uncheckedopts 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.1was 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 inChangeStore::get_change_by_lamport_lte— e.g. the movable-list diff calculator resolving historical positions duringcheckout— 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.