loro-crdt 1.13.3 → 1.13.4
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 +23 -0
- package/base64/index.js +79 -78
- package/base64/loro_wasm.d.ts +19 -19
- package/browser/index.js +4 -4
- package/browser/loro_wasm.d.ts +19 -19
- package/browser/loro_wasm.js +12 -12
- package/browser/loro_wasm_bg.js +74 -73
- package/browser/loro_wasm_bg.wasm +0 -0
- package/browser/loro_wasm_bg.wasm.d.ts +2 -2
- package/bundler/index.js +4 -4
- package/bundler/loro_wasm.d.ts +19 -19
- package/bundler/loro_wasm_bg.js +74 -73
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/loro_wasm.d.ts +19 -19
- package/nodejs/loro_wasm.js +74 -73
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +21 -21
- package/web/loro_wasm.js +73 -72
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.13.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4d577ad: Fix two O(n^2) editing slowdowns.
|
|
8
|
+
|
|
9
|
+
1. Editing with UTF-16 / UTF-8 (byte) positions (the default in the JS binding)
|
|
10
|
+
validated each position by materializing the entire `[0, pos)` prefix string,
|
|
11
|
+
making every `insert`/`delete`/`splice`/`mark` O(n) and a run of edits O(n^2)
|
|
12
|
+
(regression since 1.12.0). The boundary check now reads the rope's prefix
|
|
13
|
+
caches via the cursor (O(log n)). Unicode-indexed editing was unaffected.
|
|
14
|
+
2. When a subscriber is attached and many edits land on the same container within
|
|
15
|
+
one event batch (e.g. random-position inserts, or many distinct map-key
|
|
16
|
+
writes), building the event cloned the growing accumulated diff on every
|
|
17
|
+
compose — O(n^2) in the number of fragments. The diffs are now composed in
|
|
18
|
+
place. This affected text, map and list events.
|
|
19
|
+
3. Converting a UTF-16 / UTF-8 position within a text chunk to a unicode offset
|
|
20
|
+
scanned the chunk char-by-char, so editing/slicing a large contiguous chunk
|
|
21
|
+
(a big insert, a loaded document, or a long run of typed text that merges into
|
|
22
|
+
one chunk) was O(chunk length) per op. Chunks that contain no astral-plane
|
|
23
|
+
characters (UTF-16) or are pure ASCII (UTF-8) now convert in O(1), covering
|
|
24
|
+
essentially all real-world text (ASCII/Latin/CJK).
|
|
25
|
+
|
|
3
26
|
## 1.13.3
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|