loro-crdt 1.13.5 → 1.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+
9
+ 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.
10
+
11
+ - 9b6330d: Speed up local text editing (~35% faster on the B4 editing trace). Three hot-path
12
+ changes: the lock-order debug instrumentation is now compiled out of release
13
+ builds (it ran on every per-op lock acquisition); the visible-op count is bumped
14
+ incrementally for local ops instead of recomputing it from the version vectors
15
+ (which also allocated) on every op; and a couple of per-op allocations on the
16
+ text insert/delete path were removed (lazy error-context formatting and inline
17
+ storage for entity ranges).
18
+ - 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.
19
+
20
+ ## 1.13.6
21
+
22
+ ### Patch Changes
23
+
24
+ - a4e6174: Fix undo/redo restoring mergeable map children as regular non-mergeable containers.
25
+ - 78f6c8a: Fix a potential deadlock when lazy snapshot loading resolves mergeable container parent depths.
26
+
3
27
  ## 1.13.5
4
28
 
5
29
  ### Patch Changes
@@ -76,7 +100,7 @@
76
100
 
77
101
  ### Minor Changes
78
102
 
79
- - fa888d8: Add mergeable child containers: child containers created under a map key that converge across peers on concurrent first-write instead of forking. Exposed as `ensureMergeable{Counter,Map,List,MovableList,Text,Tree}` on `LoroMap`. A mergeable child lives at a deterministic `ContainerID` derived from `(parent, key, kind)`, and its visibility is driven by a binary ref the parent map stores at the key, so deletes and kind conflicts resolve through the map's regular LWW.
103
+ - fa888d8: Add mergeable child containers: child containers created under a map key that converge across peers on concurrent first-write instead of forking. Exposed as `ensureMergeable{Counter,Map,List,MovableList,Text,Tree}` on `LoroMap`. A mergeable child lives at a deterministic `ContainerID` derived from `(parent, key, kind)`, and its visibility is driven by a binary ref the parent map stores at the key, so deletes and kind conflicts resolve through the map's regular LWW. `getOrCreateContainer` is deprecated for lazy map-child creation; migrate those call sites to `ensureMergeable*`. `setContainer` and `insertContainer` regular semantics are unchanged.
80
104
 
81
105
  ## 1.12.5
82
106
 
package/README.md CHANGED
@@ -60,6 +60,7 @@ Loro is a [CRDTs(Conflict-free Replicated Data Types)](https://crdt.tech/) libra
60
60
  - 🌲 [Moveable Tree](https://loro.dev/docs/tutorial/tree)
61
61
  - 🚗 [Moveable List](https://loro.dev/docs/tutorial/list)
62
62
  - 🗺️ [Last-Write-Wins Map](https://loro.dev/docs/tutorial/map)
63
+ - 🤝 Mergeable map-key children via `ensureMergeable*` for lazy child container creation
63
64
 
64
65
  **Advanced Features in Loro**
65
66