Commit graph

194 commits

Author SHA1 Message Date
Leon Zhao
cd04b27d65
fix: fuzz cache and counter feature (#373)
* fix: fuzz cache and counter feature

* fix: rev
2024-05-29 22:44:21 +08:00
Zixuan Chen
b13b4bcf94
refactor: reuse more serde_columnar code 2024-05-27 19:02:01 +08:00
Zixuan Chen
0c81543b6e
chore: bk impl for block encode & decode 2024-05-27 11:52:23 +08:00
Zixuan Chen
321e0e72a4
Undo (#361)
https://github.com/loro-dev/loro/pull/361

---------

Co-authored-by: Leon Zhao <leeeon233@gmail.com>
2024-05-21 06:14:49 +08:00
Leon Zhao
6e14e5b117
Feat: Make the encoding format forward and backward compatible (#329) 2024-05-13 21:37:10 +08:00
Zixuan Chen
0660b1a1be
fix: upgrade wasm-bindgen to fix str free err (#353)
* fix: upgrade wasm-bindgen to fix str free err

* chore: fix ci
2024-05-09 15:22:34 +08:00
Leon Zhao
51a673822e
fix: tree fuzz sort value (#351) 2024-05-07 19:39:38 +08:00
Leon Zhao
fffd49b5fa
Use fractional index to order the children of the tree (#298)
* feat: fractional index

---------

Co-authored-by: Zixuan Chen <remch183@outlook.com>
2024-05-07 14:01:13 +08:00
Zixuan Chen
4021ad820c
chore: loro-rs v0.5.1 2024-05-06 13:37:55 +08:00
Zixuan Chen
c2da94a557
fix: upgrade generic-btree to allow large btree (#344) 2024-05-02 16:45:33 +08:00
Zixuan Chen
5660bcc4a5
chore: bump loro-rs to v0.5.0 2024-04-29 18:09:07 +08:00
Leon Zhao
a1ec948c32
fix: fuzz tree delete nested (#336) 2024-04-28 17:06:47 +08:00
Zixuan Chen
31a8569840
Movable List (#293)
* bk: add move op content

* bk: add inner_movable_list diff and related stuff

* perf: high perf state

* fix: update old list item cache

* fix: should use id in del

* feat: two kinds of len for movable list state

* bk: add op index to movable list

* bk: make basic handler test pass

* refactor: add move_from to list event

* fix: make all existing tests pass

* bk: list move event hint into event

* bk: convert inner event into user event

Co-authored-by: Leon <leeeon233@gmail.com>

* fix: convert issue when inserting new value

* feat: add op group for movable list

* feat: diff calc

* feat: add mov support to tracker

* fix: when applying diff, state should be force update

* feat: encoded op

* feat: snapshot encode

* fix: pass basic sync

* fix: snapshot encode/decode

* fix: warnings

* feat: expose mov list to loro crate

* test: fuzz movable list

* test: fix fuzz integration

* fix: movable list basic move sync

* fix: movable list events

* fix: movable event err

* fix: register child container on movable list

* fix: should not return child index if the value is already overwritten

* fix: local event err in movable list

* fix: get elem at pos

* refactor: extract mut op that could break invariants

* fix: event err

* fix: child container to elem err

* fix: bringback event issue

* fix: event err

* fix: event emit

* fix: id to cursor iter issue

* chore: fix a few warnings

* fix: warnings

* fix: fix move in tracker

* test: add consistency check

* test: fix tracker

* refactor: simplify event conversion in docstate

* refactor: refine move event

* refactor: simplify the maintain of parent child links

* fix: revive err

* fix: warnings

* fix: it's possible that pos change but cannot find the respective list item

* fix: elem may be dropped after snapshot

* fix: warnings

* fix: richtext time travel issue

* fix: move op used wrong delete id on tracker

* fix: handle events created by concurrent moves correctly

* fix: event hint error, used op index for list event

* fix: move_from flag err

* fix: id to cursor get err

* test: add mov fuzz target

* fix: the pos of inserting new container

* fix: used wrong event hint index

* fix: del event hint

* fix: warnings

* fix: internal diff to event err

* fix: event's move flag error
This "move" flag does not actually mean that the insertion
is caused by the move op.
就算是 move 造成的它不一定就能是 true
它得是下游真的能在“前一个版本的 array 里找到“,才能是 true

* fix: remove redundant elements from the movable list

The Movable List is currently flawed; an element may not exist on the movable list state, yet there are operations that revive its corresponding list item. In such cases, the diff calculation does not send back the corresponding element state (this occurs when tracing back, which fuzz testing currently does not cover. It might only be exposed by randomly switching to a version and then checking for consistency; otherwise, as long as all elements are in memory, this problem does not arise).

Moreover, there is no need to store elements in the state that do not have a corresponding list item. They will be deleted during the Snapshot, and relying on "them still being in the state" is incorrect behavior. Such adjustments also eliminate the need to maintain the `pending_elements` field.

By allowing the opgroup to record the mapping from pos id to state id, we can ensure that the events sent to the movable list state will include the corresponding state.

Movable List 现在是有错的,elem 可能不存在 movable list state 上,但是又有操作把它对应的 list item 复活了,此时 diff calc 不会把对应 element 状态发送回来(往前回溯的时候会出现,fuzz 现在没覆盖到。得有随意切换一个版本然后 check consistency 才可能会暴露;否则现在大家 elements 都在内存,就没这个问题)

而且我们没有必要在状态中存储没有对应 list item 的 element。在 Snapshot 的时候它们都会被删掉,如果依赖了“它们还会在 state 内”就是错误的行为。这样的调整也让我们不需要去维护 pending_elements 这个 field 了

通过让 opgroup 记录了 pos id → state id 的映射,可以保证发给 movable list state 的事件中会带上对应的 state

* test: make fuzzer stricter

* test: test expectation error

* refactor: rename stable pos to cursor

* tests: chore list bench init

* test: add bench

* bench: add mov & set bench

* feat(wasm): movable list js api

* fix: make movablelist able to attach even if it's already attached & refine the type of subscribe

* fix: remove the loro doc param in .unsub

* refactor: refine ts types and export setContainer api

* chore: fix warnings

* chore: rm debug logs

* perf: reduce mem usage of opgroup

* bench: add list criterion bench

---------

Co-authored-by: Leon <leeeon233@gmail.com>
2024-04-26 12:08:53 +08:00
Zixuan Chen
9d4f7aa8a3
DeltaRope (#327)
* feat: delta rope support init

* perf: use generic-btree v0.9.0

* refactor: improve readability and maintainability

* fix: fix several issues about composing

* fix: a few more issue about composing deletions

* test: rich text

* fix: cover more edge cases

* refactor: use deltarope for list event

* refactor: replace text delta with DeltaRope

* fix: list fuzz err

* fix: safety issue on insert_many

* chore: refine impl of text delta

* refactor: use Replace instead of insert+del in DeltaItem (#330)

* refactor: use Replace instead of insert+del in DeltaItem

* fix: each deltaitem should have non-zero rle_len
Updated generic-btree dependency to version 0.10.3 and refactored DeltaItem and DeltaRope implementations in loro-delta. Refine compose impl

* fix: update generic-btree to fix the update leaf issue

* chore: lockfile

* chore: clippy fix

* refactor: make composing easier to understand

* refactor: simplify the impl of composing
2024-04-24 13:53:26 +08:00
Zixuan Chen
f99bfd8e21
Refactor rm unused code (#328)
* chore: init

* fix: fuzz config

* refactor: rm unused code
2024-04-22 21:20:00 +08:00
Zixuan Chen
454b4088a6
chore(rs): bump versions of rust crates 2024-04-09 16:23:48 +08:00
Zixuan Chen
81ae2abacc
Cursors (#290)
This PR introduces support for retrieving and querying cursors.

## Motivation

Using "index" to denote cursor positions can be unstable, as positions may shift with document edits. To reliably represent a position or range within a document, it is more effective to leverage the unique ID of each item/character in a List CRDT or Text CRDT.

## Updating Cursors

Loro optimizes State metadata by not storing the IDs of deleted elements. This approach, while efficient, complicates tracking cursor positions since they rely on these IDs for precise locations within the document. The solution recalculates position by replaying relevant history to update stable positions accurately. To minimize the performance impact of history replay, the system updates cursor info to reference only the IDs of currently present elements, thereby reducing the need for replay.

Each position has a "Side" information, indicating the actual cursor position is on the left, right, or directly in the center of the target ID.

Note: In JavaScript, the offset returned when querying a Stable Position is based on the UTF-16 index.

# Example

```ts
const loro = new Loro();
const list = loro.getList("list");
list.insert(0, "a");
const pos0 = list.getStablePos(0);
list.insert(1, "b");
{
  const ans = loro.queryStablePos(pos0!);
  expect(ans.offset).toEqual(0);
  expect(ans.side).toEqual(0);
  expect(ans.update).toBeUndefined();
}
list.insert(0, "c");
{
  const ans = loro.queryStablePos(pos0!);
  expect(ans.offset).toEqual(1);
  expect(ans.side).toEqual(0);
  expect(ans.update).toBeUndefined();
}
list.delete(1, 1);
{
  const ans = loro.queryStablePos(pos0!);
  expect(ans.offset).toEqual(1);
  expect(ans.side).toEqual(-1);
  expect(ans.update).toBeDefined();
}
```
2024-04-09 16:01:37 +08:00
Leon Zhao
51890ff8d8
fix: decode iter return result by updating columnar to 0.3.4 (#309) 2024-04-01 17:29:07 +08:00
Leon Zhao
a47cf06712
Refactor fuzzing test (#271)
* feat: new fuzz test

* test: add arbtest

* fix: remove PROPTEST_FACTOR
2024-03-08 16:40:06 +08:00
Zixuan Chen
1233b8df82
refactor: replace debug-log with tracing (#285)
* refactor: replace debug-log with tracing

* chore: fix setDebug in wasm

* chore: rm useless comments
2024-03-04 20:06:24 +08:00
Zixuan Chen
06e3a5420d
refactor: reduce tracker mem usage by using nonmax id (#282) 2024-02-29 22:55:57 +08:00
Zixuan Chen
17571ab6e0
Add size benchmark example (#276)
* test: add size bench example

* chore: update lock file
2024-02-28 21:59:20 +08:00
Zixuan Chen
f648b353ad
chore: upgrade rust crates 2024-02-16 11:30:56 +08:00
Zixuan Chen
0bcc3bd56d
chore: upgrade wasm-bindgen to 0.2.90 (#262) 2024-01-29 22:40:33 +08:00
Leon Zhao
f6cc5da0f1
refactor: Optimizing Encoding Representation for Child Container Creation to Reduce Document Size (#247)
* refactor: encoding container id

* fix: container indexing when merged ops in encoding

* chore: add compress encode size for draw example

* fix: do not need cids in encoding

* chore: change name containerIdx to containerType in encoding
2024-01-22 12:19:09 +08:00
Zixuan Chen
5f1353791d
Remove txn abort and reduce mem usage (#240)
* refactor: rm txn.abort and related undo behavior

* perf: simplify richtext state when there is not styles

* perf: reduce text cost when there is no style

* chore: refine logs

* perf: remove cid in states to reduce mem overhead

* refactor: reduce mem overhead by using a compacter mapvalue

* refactor: rm the box inside richtext state
2024-01-08 17:29:11 +08:00
Zixuan Chen
a30abf7af1
chore: upgrade debug-log to fix type issue 2024-01-05 16:07:47 +08:00
Zixuan Chen
aaec64a503
Update debug-log (#236)
* chore: use new version of debug-log

* fix: rm group_end
2024-01-05 12:12:04 +08:00
Zixuan Chen
a6be7d2ea6
refactor: make InternalString an internal struct (#233) 2024-01-02 20:11:22 +08:00
Zixuan Chen
bc27a47531
feat: stabilizing encoding (#219)
This PR implements a new encode schema that is more extendible and more compact. It’s also simpler and takes less binary size and maintaining effort. It is inspired by the [Automerge Encoding Format](https://automerge.org/automerge-binary-format-spec/).

The main motivation is the extensibility. When we integrate a new CRDT algorithm, we don’t want to make a breaking change to the encoding or keep multiple versions of the encoding schema in the code, as it will make our WASM size much larger. We need a stable and extendible encoding schema for our v1.0 version.

This PR also exposes the ops that compose the current container state. For example, now you can make a query about which operation a certain character quickly. This behavior is required in the new snapshot encoding, so it’s included in this PR.

# Encoding Schema

## Header

The header has 22 bytes.

- (0-4 bytes) Magic Bytes: The encoding starts with `loro` as magic bytes.
- (4-20 bytes) Checksum: MD5 checksum of the encoded data, including the header starting from 20th bytes. The checksum is encoded as a 16-byte array. The `checksum` and `magic bytes` fields are trimmed when calculating the checksum.
- (20-21 bytes) Encoding Method (2 bytes, big endian): Multiple encoding methods are available for a specific encoding version.

## Encode Mode: Updates

In this approach, only ops, specifically their historical record, are encoded, while document states are excluded.

Like Automerge's format, we employ columnar encoding for operations and changes.

Previously, operations were ordered by their Operation ID (OpId) before columnar encoding. However, sorting operations based on their respective containers initially enhance compression potential.

## Encode Mode: Snapshot

This mode simultaneously captures document state and historical data. Upon importing a snapshot into a new document, initialization occurs directly from the snapshot, bypassing the need for CRDT-based recalculations.

Unlike previous snapshot encoding methods, the current binary output in snapshot mode is compatible with the updates mode. This enhances the efficiency of importing snapshots into non-empty documents, where initialization via snapshot is infeasible. 

Additionally, when feasible, we leverage the sequence of operations to construct state snapshots. In CRDTs, deducing the specific ops constituting the current container state is feasible. These ops are tagged in relation to the container, facilitating direct state reconstruction from them. This approach, pioneered by Automerge, significantly improves compression efficiency.
2024-01-02 17:03:24 +08:00
Zixuan Chen
727b5c2518
Add benchmark utils that simulate drawing workflow (#229)
* chore: add benchmark utils that simulate drawing workflow

* chore: use markdown as table default style

* chore: init sheet simulating
2023-12-28 18:00:34 +08:00
Zixuan Chen
f4c6b6dce7
refactor: rm compact bytes (#206) 2023-12-05 11:58:09 +08:00
Zixuan Chen
cccb4f3957
perf(wasm): reduce wasm size (#198) 2023-11-29 13:59:39 +08:00
Zixuan Chen
fddcf7a321
chore: publish v0.2.2 with refined doc 2023-11-28 23:23:07 +08:00
Zixuan Chen
cd8be80a6f
docs: refine rust api doc 2023-11-28 23:20:57 +08:00
Zixuan Chen
1eae5ea495
chore: bump loro rust to v0.2.1 2023-11-28 22:22:09 +08:00
Zixuan Chen
22cf71a759
chore: upgrade loro to v0.2.1 2023-11-28 22:18:21 +08:00
Zixuan Chen
564dde7703
chore: publish mvp rust api 2023-11-28 21:29:11 +08:00
Zixuan Chen
6ef1e12d71
chore: rm zerovec 2023-11-28 21:01:01 +08:00
Zixuan Chen
2ad7202e05
Feat-rust-api (#193) 2023-11-28 16:22:43 +08:00
Leon zhao
dd8bf7719e
refactor: rm loro nodejs (#185) 2023-11-21 23:12:05 +08:00
Leon zhao
899270c6de
fix: remove compress feature (#184)
BREAKING CHANGE: encoding schema is changed
2023-11-21 21:48:25 +08:00
Zixuan Chen
7ccfd1e91d
feat: expose version and change inspect api to wasm (#156) 2023-11-05 16:06:34 +08:00
Zixuan Chen
8bd953e396
refactor: extract text chunk (#153) 2023-11-04 20:03:43 +08:00
Zixuan Chen
5b65963104
fix: imported changes were not mergeable (#147)
* fix: imported changes were not mergeable
now the small encoding size is supported in example

* fix: stupid err in richtext checkout

* fix: rle oplog encode err
- support pending changes
- start counters were wrong
2023-11-04 12:23:28 +08:00
Zixuan Chen
da16b8a99d
refactor: use better repr for container id (#144) 2023-11-02 17:13:08 +08:00
Zixuan Chen
a40b5c6e4a
feat: support richtext in wasm & mark text with arbitrary value (#142)
- Support mark text with custom value [LORO-299] Allow users to mark text with custom value #139
- Expose richtext in wasm
2023-11-02 14:20:34 +08:00
Zixuan Chen
a52549ea30
fix: g-btree bug, fixed by upgrade dep 2023-10-31 22:04:43 +08:00
Zixuan Chen
bcf81a45eb
fix: g-btree delete leaf err
upgrade generic-btree
2023-10-31 21:08:07 +08:00
Zixuan Chen
4d87725f32
chore: rm needless package 2023-10-29 22:13:59 +08:00
Zixuan Chen
d942e3d7a2
Feat: Peritext-like rich text support (#123)
* feat: richtext wip

* feat: add insert to style range map wip

* feat: richtext state

* fix: fix style state inserting and style map

* fix: tiny vec merge err

* fix: comment err

* refactor: use new generic-btree & refine impl

* feat: fugue tracker

* feat: tracker

* feat: tracker

* fix: fix a few err in impl

* feat: init richtext content state

* feat: refactor arena

* feat: extract anchor_type info out of style flag

* refactor: state apply op more efficiently
we can now reuse the repr in state and op

* fix: new clippy errors

* refactor: use state chunk as delta item

* refactor: use two op to insert style start and style end

* feat: diff calc

* feat: handler

* fix: tracker checkout err

* fix: pass basic richtext handler tests

* fix: pass handler basic marking tests

* fix: pass all peritext criteria

* feat: snapshot encoding for richtext init

* refactor: replace Text with Richtext

* refacotr: rm text code

* fix: richtext checkout err

* refactor: diff of text and map

* refactor: del span

* refactor: event

* fix: fuzz err

* fix: pass all tests

* fix: fuzz err

* fix: list child cache err

* chore: rm debug code

* fix: encode enhanced err

* fix: encode enchanced

* fix: fix several richtext issue

* fix: richtext anchor err

* chore: rm debug code

* fix: richtext fuzz err

* feat: speedup text snapshot decode

* perf: optimize snapshot encoding

* perf: speed up decode & insert

* fix: fugue span merge err

* perf: speedup delete & id cursor map

* fix: fugue merge err

* chore: update utils

* perf: speedup text insert / del

* fix: cursor cache

* perf: reduce conversion by introducing InsertText

* perf: speed up by refined cursor cache

* chore: update gbtree dep

* refactor(wasm): use quill delta format

* chore: fix warnings
2023-10-29 14:02:13 +08:00
leeeon233
f1adc7d15d chore: use columnar 0.3.2 2023-09-11 14:54:54 +08:00
leeeon233
5b0f3e3f50 feat: update columnar 2023-09-08 08:21:46 +08:00
Zixuan Chen
f208744ec1
feat: encode/decode v2 2023-08-29 15:13:52 +08:00
Zixuan Chen
08beb9f60b chore: rm serde requirement in append-only-bytes 2023-08-04 11:03:57 +08:00
Zixuan Chen
1e736df133
Refactor: rm legacy code (#97)
* refactor: rm legacy code

* chore: rm dead code

* refactor: mv refactored files outside

* refactor: rename files & methods

* chore: rm unused deps

* fix: compact bytes err

* chore: fix ci
2023-07-31 11:49:55 +08:00
Zixuan Chen
86057adb05 fix: make events JsValue
this can avoid memory leak when FinalizationRegistry is unavailable
2023-07-30 20:33:46 +08:00
Zixuan Chen
15be521777 feat: event & wasm 2023-07-29 02:03:51 +08:00
Zixuan Chen
fa13d1d06f fix: list state err
update g-btree to use a get node with Option
return value
2023-07-23 00:11:46 +08:00
Zixuan Chen
5a233501cc perf: speed up import by reducing dag nodes 2023-07-18 01:23:49 +08:00
Zixuan Chen
d03617ca26 feat: add bench 2023-07-17 23:18:18 +08:00
Zixuan Chen
e993f1b155 feat: basic snapshot encoding 2023-07-17 12:27:11 +08:00
Zixuan Chen
6983a2b00c refactor: mov loro value to loro_common 2023-07-15 00:47:47 +08:00
Zixuan Chen
fc49b4b3b4 refactor: mov important basic types into loro-common 2023-07-14 16:38:53 +08:00
Zixuan Chen
dde0152912 refactor: prepare for snapshot encoding 2023-07-14 16:05:06 +08:00
Zixuan Chen
6311782943 perf: optimize compress & speed
but no cap for now
2023-07-13 22:43:02 +08:00
Zixuan Chen
346117ff54 feat: supports setting capacity 2023-07-13 16:57:41 +08:00
Zixuan Chen
f604a89fc3 refactor(bytes): refine interface 2023-07-13 15:33:49 +08:00
Zixuan Chen
8ebd41fa3d feat: connect diff calculator 2023-07-12 00:29:23 +08:00
Zixuan Chen
b1d438d08d fix: a weird deps bug
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /Users/zxch3n/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.49/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^
2023-07-10 15:57:55 +08:00
Zixuan Chen
2cbe21463c feat: list & text states 2023-07-04 11:27:09 +08:00
Zixuan Chen
f042f86a92 chore: basic interfaces design 2023-07-03 00:40:05 +08:00
Zixuan Chen
abd3e38253 chore: bk 2023-07-02 23:24:17 +08:00
Zixuan Chen
c50294ac22 feat: use text tracker diff 2023-06-29 16:09:42 +08:00
Zixuan Chen
831ab0f04d Merge branch 'main' into refactor-wasm 2023-03-24 11:59:28 +08:00
Zixuan Chen
63ebbe2ddb chore: remove tracing 2023-03-23 21:17:16 +08:00
Zixuan Chen
32378a7188 fix: use promise.then instead of timeout 2023-03-23 21:16:29 +08:00
Zixuan Chen
94f481e65e fix: settimeout by default in subscription 2023-03-23 19:09:13 +08:00
Zixuan Chen
490a54d559 feat: expose from loro crate 2023-03-21 11:09:12 +08:00
leeeon233
d8f0dfa673 chore: clean the code 2023-03-21 09:47:24 +08:00
leeeon233
117155cc54 perf: remove compress 2023-03-20 13:55:20 +08:00
leeeon233
39a7e49b2e Merge branch 'main' into feat-transaction 2023-03-17 10:20:04 +08:00
leeeon233
ea921e4c8f fix: remove counter & lamport from RleUpdates encoding 2023-02-18 18:03:05 +08:00
leeeon233
5b6f864479 feat: init nodejs bindgen 2023-02-16 11:22:50 +08:00
leeeon233
2aa0a76537 chore: update wasm-bindgen 2023-02-07 11:40:47 +08:00
leeeon233
83972746a6 feat: add python bingen 2023-01-29 17:48:37 +08:00
leeeon233
c10b1237e0 chore: rebase main 2023-01-29 17:48:37 +08:00
leeeon233
a26d4b0122 feat: init ffi 2023-01-29 17:48:37 +08:00
Zixuan Chen
18d32384a5 refactor: move loro-core to loro-internal 2023-01-16 20:08:43 +08:00
leeeon233
a20b4c9e8b fix: interface update 2023-01-16 18:38:55 +08:00
Zixuan Chen
9748779f08
Bench: report (#49) 2022-12-27 14:18:46 +08:00
leeeon233
4748e1d38c fix: decode hierarchy for snapshot mode
update columnar version, reduce compression time
2022-12-19 18:07:24 +08:00
leeeon233
9b74125ba5 chore: update columnar 2022-12-13 23:02:33 +08:00
leeeon233
70b3126d79 chore: rebase main 2022-12-13 23:02:32 +08:00
leeeon233
2fb675f145 chore: clean file 2022-12-13 23:02:32 +08:00
leeeon233
48d784bcd1 feat: add map state snapshot 2022-12-13 23:01:17 +08:00
Zixuan Chen
83af4d07eb
Merge pull request #44 from loro-dev/feat-wasm-encode
Feat: wasm encode
2022-12-13 16:34:54 +08:00
Zixuan Chen
68bd7179c4
Perf remove string pool mutex (#41)
This is based on append-only-bytes. It allows us to share str data in a lock-free way. The downside of this method is it tends to use more memory
2022-12-09 17:22:33 +08:00
Zixuan Chen
a24e284fba fix: hierarchy notify 2022-12-09 10:46:55 +08:00
Zixuan Chen
594b60dafb
Perf store cache in parent node (#36)
* refactor: make internal and leaf use same type of cache

* refactor: add cache update

* test : add normalization to arb test

* test: fuzz

* fix: internal insert bug

* fix: missing utf16

* test: fix test sub overflow

* feat: use heapless for binary heap

* refactor: refine warning

* test: reduce test time

* perf: reduce computation when finding pos

* bench: fix ignore parse time in benching

* feat: make it compile in new sig (should be merged)

* fix: type err

* fix: fix type err

* fix: cache when merge & borrow

* refactor: simplify code

* fix: cumulated tree trait bug

* fix: a few fatal bugs (still buggy)

* fix: global tree trait

* refactor: rm an unused fn

* fix: insert at cursor bug

* fix: in cursor insert cache may be invalid

strip the checker there

* chore: remove needless check

* refactor: add inline to methods

* test: remove cfg=mem for mem example

* fix: type err
2022-12-06 16:34:46 +08:00