diff --git a/.changeset/faster-text-imports.md b/.changeset/faster-text-imports.md deleted file mode 100644 index bb938da5e..000000000 --- a/.changeset/faster-text-imports.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"loro-crdt": patch -"loro-crdt-map": patch ---- - -Improve text insert and snapshot import performance by avoiding duplicate text boundary validation and skipping eager imported change block parsing. diff --git a/.changeset/perf-per-op-editing-regression.md b/.changeset/perf-per-op-editing-regression.md deleted file mode 100644 index 1364bec5a..000000000 --- a/.changeset/perf-per-op-editing-regression.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"loro-crdt": patch -"loro-crdt-map": patch ---- - -Recover two per-operation editing slowdowns regressed since 1.11. - -Both are constant-factor regressions on the per-op (auto-commit) editing path -introduced by the lazy-snapshot work in #985, measured against the 1.11.1 -release. - -1. Every `MapHandler`/`ListHandler`/`MovableListHandler` insert validated its - value with `ensure_no_regular_container_value`, which heap-allocated a `Vec` - on each call even for scalar values (the common case). A scalar fast-path now - skips the allocation and traversal entirely. `map create 10^4 key`: - ~19.4ms -> ~10.7ms. - -2. The per-op text bounds check (`TextHandler::len`/`len_unicode`/`len_utf16`) - took two `DocState` locks — one to check whether the container state was - decoded, then another to query the length. These are now consolidated into a - single `DocState::get_text_len` that takes one lock and one container-store - lookup. The lazy-snapshot memory behavior is preserved: a still-lazy - container reads its cached length metadata without materializing the full - richtext state. `bench_text B4 apply` (per-op text editing): ~389ms -> ~352ms. diff --git a/crates/loro-wasm-map/CHANGELOG.md b/crates/loro-wasm-map/CHANGELOG.md index e67794d89..201c91827 100644 --- a/crates/loro-wasm-map/CHANGELOG.md +++ b/crates/loro-wasm-map/CHANGELOG.md @@ -1,5 +1,29 @@ # loro-crdt-map +## 1.13.5 + +### Patch Changes + +- 1727258: Improve text insert and snapshot import performance by avoiding duplicate text boundary validation and skipping eager imported change block parsing. +- 52d8168: Recover two per-operation editing slowdowns regressed since 1.11. + + Both are constant-factor regressions on the per-op (auto-commit) editing path + introduced by the lazy-snapshot work in #985, measured against the 1.11.1 + release. + + 1. Every `MapHandler`/`ListHandler`/`MovableListHandler` insert validated its + value with `ensure_no_regular_container_value`, which heap-allocated a `Vec` + on each call even for scalar values (the common case). A scalar fast-path now + skips the allocation and traversal entirely. `map create 10^4 key`: + ~19.4ms -> ~10.7ms. + 2. The per-op text bounds check (`TextHandler::len`/`len_unicode`/`len_utf16`) + took two `DocState` locks — one to check whether the container state was + decoded, then another to query the length. These are now consolidated into a + single `DocState::get_text_len` that takes one lock and one container-store + lookup. The lazy-snapshot memory behavior is preserved: a still-lazy + container reads its cached length metadata without materializing the full + richtext state. `bench_text B4 apply` (per-op text editing): ~389ms -> ~352ms. + ## 1.13.4 ### Patch Changes diff --git a/crates/loro-wasm-map/package.json b/crates/loro-wasm-map/package.json index d6f4f12d5..61ceb7c48 100644 --- a/crates/loro-wasm-map/package.json +++ b/crates/loro-wasm-map/package.json @@ -1,6 +1,6 @@ { "name": "loro-crdt-map", - "version": "1.13.4", + "version": "1.13.5", "description": "Source maps for the loro-crdt WebAssembly bundles.", "repository": { "type": "git", diff --git a/crates/loro-wasm/CHANGELOG.md b/crates/loro-wasm/CHANGELOG.md index 62194deed..511e71775 100644 --- a/crates/loro-wasm/CHANGELOG.md +++ b/crates/loro-wasm/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## 1.13.5 + +### Patch Changes + +- 1727258: Improve text insert and snapshot import performance by avoiding duplicate text boundary validation and skipping eager imported change block parsing. +- 52d8168: Recover two per-operation editing slowdowns regressed since 1.11. + + Both are constant-factor regressions on the per-op (auto-commit) editing path + introduced by the lazy-snapshot work in #985, measured against the 1.11.1 + release. + + 1. Every `MapHandler`/`ListHandler`/`MovableListHandler` insert validated its + value with `ensure_no_regular_container_value`, which heap-allocated a `Vec` + on each call even for scalar values (the common case). A scalar fast-path now + skips the allocation and traversal entirely. `map create 10^4 key`: + ~19.4ms -> ~10.7ms. + 2. The per-op text bounds check (`TextHandler::len`/`len_unicode`/`len_utf16`) + took two `DocState` locks — one to check whether the container state was + decoded, then another to query the length. These are now consolidated into a + single `DocState::get_text_len` that takes one lock and one container-store + lookup. The lazy-snapshot memory behavior is preserved: a still-lazy + container reads its cached length metadata without materializing the full + richtext state. `bench_text B4 apply` (per-op text editing): ~389ms -> ~352ms. + ## 1.13.4 ### Patch Changes diff --git a/crates/loro-wasm/Cargo.toml b/crates/loro-wasm/Cargo.toml index 7ae83be26..85fe05247 100644 --- a/crates/loro-wasm/Cargo.toml +++ b/crates/loro-wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "loro-wasm" -version = "1.13.4" +version = "1.13.5" edition = "2021" publish = false repository = "https://github.com/loro-dev/loro/" diff --git a/crates/loro-wasm/package.json b/crates/loro-wasm/package.json index 0f2b6e082..de80ef7fb 100644 --- a/crates/loro-wasm/package.json +++ b/crates/loro-wasm/package.json @@ -1,6 +1,6 @@ { "name": "loro-crdt", - "version": "1.13.4", + "version": "1.13.5", "description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.", "keywords": [ "crdt",