Commit 864b5ca
authored
perf(loro-internal): remove quadratic slow paths in text import/checkout (#893)
* perf: opt step 1
* perf(loro-internal): speed up InsertText slicing during change split
- Add ASCII/suffix fast paths in InnerListOp::slice to avoid O(n^2)
unicode->byte scans
- Add ignored perf test reproducing split-suffix slicing pattern
* perf(loro-internal): batch id_to_cursor updates on richtext leaf splits
- Batch leaf-split remaps via IdToCursor::update_insert_batch to reduce
per-split InsertSet::update churn.
- Add InsertSet::update_many fast-path for small fragments (<=
MAX_FRAGMENT_LEN) by rebuilding runs from a dense map.
- Ignore .trace_analysis/ artifacts.
* fix: a failed fuzzing test
* perf(loro-internal): optimize fast path for plain-text deltas in richtext state
- Introduced a new method `content_node_len` to retrieve the length of content nodes.
- Enhanced the logic for determining when to apply fast updates for plain-text deltas, reducing unnecessary rebuilds.
- Improved performance by minimizing BTree mutations during incremental updates.
* chore: changeset1 parent a34134d commit 864b5ca
File tree
12 files changed
+969
-285
lines changed- .changeset
- crates
- fuzz
- fuzz
- tests
- loro-internal/src
- container
- list
- richtext
- tracker
- handler
- state
- utils
- loro/tests
12 files changed
+969
-285
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
0 commit comments