Zixuan Chen
58fb7de26c
fix: remove changes error freeze behavior
...
and cover more cases that can be applied directly
2022-11-09 13:53:12 +08:00
Zixuan Chen
5c0c09e2d1
perf: apply edits directly when possible
2022-11-09 12:18:27 +08:00
Zixuan Chen
8616f4d3b0
chore: cargo fix
2022-11-08 23:51:31 +08:00
Zixuan Chen
e7af203efa
Merge branch 'chore-clean-todos'
2022-11-08 12:41:11 +08:00
Zixuan Chen
0acb003fe1
chore: update todo doc
2022-11-08 12:41:01 +08:00
Zixuan Chen
f7821f0515
fix: use after free in heap mode when deleting
2022-11-08 11:39:58 +08:00
Zixuan Chen
e833c1d5d7
chore: remove redundant todo
2022-11-08 10:50:55 +08:00
Zixuan Chen
b086185d86
chore: refine doc
2022-11-07 15:25:48 +08:00
Zixuan Chen
420d29e42f
chore: add doc for heapmode
2022-11-07 15:24:02 +08:00
Zixuan Chen
82ef8a42ee
refactor: rename modes to HeapMode and BumpMode
2022-11-07 15:20:49 +08:00
Zixuan Chen
a3df07bf5c
refactor: make Bump mode newtype
2022-11-07 15:19:48 +08:00
Zixuan Chen
c7d3e01087
refactor: no boxing for T in RleTree
...
and make Heap mode as the default mode, because users
should be aware of Bump mode's limitation before using it
2022-11-07 15:10:36 +08:00
Zixuan Chen
62891e25b3
fix: use heap mode in text state
...
Fix #8
2022-11-07 14:26:10 +08:00
Zixuan Chen
303b1c6787
chore: cargo fix
2022-11-07 14:21:06 +08:00
Zixuan Chen
24cd11f59e
refactor: make bump optional in rle tree
2022-11-07 14:16:53 +08:00
Zixuan Chen
dd2c2701c4
chore: more debug info
2022-11-01 23:07:30 +08:00
Zixuan Chen
df1892bd4e
refactor: merge reverse deletions
...
fix: counter span merge err
2022-11-01 17:16:11 +08:00
Zixuan Chen
6e03c9c04b
refactor: extract remote op
2022-10-31 23:50:00 +08:00
Zixuan Chen
27c4b1ca2b
refactor: remove change freeze field
2022-10-31 22:35:37 +08:00
Zixuan Chen
1e9d5769f3
fix: add debug info & reduce 40% mem usage
2022-10-31 21:42:19 +08:00
Zixuan Chen
9c35aa266c
fix: reduce heap alloc
2022-10-31 20:40:39 +08:00
Zixuan Chen
8cfe9f2772
perf: reduce heap alloc
2022-10-31 20:06:56 +08:00
Zixuan Chen
43c28608c6
fix: reduce heap alloc
2022-10-31 19:27:13 +08:00
Zixuan Chen
87227ad39a
Merge branch 'refactor-parallel' into feat-wasm
2022-10-28 18:49:01 +08:00
Zixuan Chen
c8d5127213
chore: cargo style fix
2022-10-28 18:28:55 +08:00
Zixuan Chen
16e3d6f3cb
chore: bk
2022-10-28 17:19:58 +08:00
Zixuan Chen
bf8973c758
feat: set range
...
fix: update cache
chore: remove useless tests
chore: add bench script
2022-10-28 15:25:11 +08:00
Zixuan Chen
b80a70bb2d
fix: reduce unsafe code
2022-10-27 16:10:22 +08:00
Zixuan Chen
328d0517c0
chore: update crdt-list dep
2022-10-26 23:35:21 +08:00
Zixuan Chen
95e514b329
refactor: simplify delete
2022-10-26 23:31:34 +08:00
Zixuan Chen
105ab9b5ef
chore: micro optimization
2022-10-26 23:31:34 +08:00
Zixuan Chen
9770fb50f3
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
6a2da8a01f
fix: avoid potential memory leak
2022-10-26 23:31:34 +08:00
Zixuan Chen
dc4571f389
refactor: remove unnecessary field
2022-10-26 23:31:34 +08:00
Zixuan Chen
02ebfbc0fc
fix: remove a few unsafe blocks about create cursor
2022-10-26 23:31:34 +08:00
Zixuan Chen
e7daca728b
refactor: cursor should not impl copy
2022-10-26 23:31:34 +08:00
Zixuan Chen
b280c21860
refactor: add RleVecWithLen to impl HasLength
2022-10-26 23:31:34 +08:00
Zixuan Chen
22f9ba3f3c
refactor: rename len method in old rlevec
2022-10-26 23:31:34 +08:00
Zixuan Chen
5220ca70f1
refactor: move rle vec impl
2022-10-26 23:31:34 +08:00
Zixuan Chen
0d89349731
refactor: use rle vec for ops
2022-10-26 23:31:34 +08:00
Zixuan Chen
1c5cd948ed
feat: new rle vec
2022-10-26 23:31:34 +08:00
Zixuan Chen
79aec7544a
refactor: rename HasLength functions
2022-10-26 23:31:34 +08:00
Zixuan Chen
e521229da2
refactor: move trait logic to one file
2022-10-26 23:31:34 +08:00
Zixuan Chen
7e5c9b0b0f
fix: rename has global index
2022-10-26 23:31:34 +08:00
Zixuan Chen
d69eca5dc5
refactor: rename rle vec to rle vec with index
2022-10-26 23:31:34 +08:00
Zixuan Chen
bfd5e090d9
refactor: use list slice
2022-10-26 23:31:34 +08:00
Zixuan Chen
5a95a3c04d
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
7284301ce8
doc: add sliceable doc
2022-10-26 23:31:34 +08:00
Zixuan Chen
478491831d
fix: rle iter logic
2022-10-26 23:31:34 +08:00
Zixuan Chen
b0572016a0
fix: effect iter, get_cursor_at_id_span bug
2022-10-26 23:31:34 +08:00
Zixuan Chen
9157e75ed7
fix: iter bug & lamport bug & set init len for tracker
2022-10-26 23:31:34 +08:00
Zixuan Chen
cf3e3ee361
fix: vec slice bug
2022-10-26 23:31:34 +08:00
Zixuan Chen
a2fcd73b44
fix: should filter out non-active spans on delete
2022-10-26 23:31:34 +08:00
Zixuan Chen
ec07825c4f
fix: slice issue
2022-10-26 23:31:34 +08:00
Zixuan Chen
b099b4507c
fix: add 2 site tests & fix update cursor bug
2022-10-26 23:31:34 +08:00
Zixuan Chen
0cd640340a
chore: cargo style fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
788808b055
fix: basic import export test
2022-10-26 23:31:34 +08:00
Zixuan Chen
61c27ca58b
fix: fix a few bugs
2022-10-26 23:31:34 +08:00
Zixuan Chen
796317097d
test: start integration testing
2022-10-26 23:31:34 +08:00
Zixuan Chen
5c47f2e04e
feat: simple export and import
2022-10-26 23:31:34 +08:00
Zixuan Chen
d1e1143c58
chore: impl basic framework of text applying
2022-10-26 23:31:34 +08:00
Zixuan Chen
9cd360e511
refactor: list slice
2022-10-26 23:31:34 +08:00
Zixuan Chen
8f6dd65522
feat: dag partial iter
2022-10-26 23:31:34 +08:00
Zixuan Chen
d47fe2df8c
test: use proptest factor to switch proptest mode
2022-10-26 23:31:34 +08:00
Zixuan Chen
9d66aeb511
test: simplify proptest
2022-10-26 23:31:34 +08:00
Zixuan Chen
0bcf19038d
chore: init apply logic
2022-10-26 23:31:34 +08:00
Zixuan Chen
aae1b2a322
refactor: simplify cursor code
2022-10-26 23:31:34 +08:00
Zixuan Chen
76269a8ca7
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
7c032b6321
fix: origin left should points to non-deleted
2022-10-26 23:31:34 +08:00
Zixuan Chen
81b8f2c591
fix: simplify create level when apply update
2022-10-26 23:31:34 +08:00
Zixuan Chen
f760aad046
test: add bench facilities
2022-10-26 23:31:34 +08:00
Zixuan Chen
7f728db495
fix: yata fuzzing works now
2022-10-26 23:31:34 +08:00
Zixuan Chen
d36c41b7cd
fix: tree balance issue
2022-10-26 23:31:34 +08:00
Zixuan Chen
a7ce6ddfd6
fix: adapt crdt-list change
2022-10-26 23:31:34 +08:00
Zixuan Chen
a93d9f762d
fix: cursor should not use Deref
...
`crdt-list` expected derefed cursor to be a sliced operation, but it was not.
so I updated crdt-list to use a GetOp trait instead of Deref, where
users may slice the op if they want to.
2022-10-26 23:31:34 +08:00
Zixuan Chen
d34abeef92
fix: insert map logic bug
2022-10-26 23:31:34 +08:00
Zixuan Chen
4213d4c488
fix: crdt-list yata integrate err
2022-10-26 23:31:34 +08:00
Zixuan Chen
3fb88bde6e
fix: build links between leaf nodes
2022-10-26 23:31:34 +08:00
Zixuan Chen
5104e94cd0
fix: fix several iter & delete bug
...
most of the bugs are related to len / content_len
2022-10-26 23:31:34 +08:00
Zixuan Chen
280382c39c
fix: yata id spans generate bug
2022-10-26 23:31:34 +08:00
Zixuan Chen
bc980c5b02
feat: iter update in rle tree
2022-10-26 23:31:34 +08:00
Zixuan Chen
ee5c9bb990
chore: add todo doc
2022-10-26 23:31:34 +08:00
Zixuan Chen
374e32384e
feat: update at cursor pos
2022-10-26 23:31:34 +08:00
Zixuan Chen
af63cd6a9c
chore: delete init
2022-10-26 23:31:34 +08:00
Zixuan Chen
944d60bfe9
docs: update find pos doc
2022-10-26 23:31:34 +08:00
Zixuan Chen
92a2e48ef5
chore: yata init
2022-10-26 23:31:34 +08:00
Zixuan Chen
41167b4af0
refactor: simplify lifetime of cursor
2022-10-26 23:31:34 +08:00
Zixuan Chen
95b63e7f47
refactor: remove RleTreeRaw layer
2022-10-26 23:31:34 +08:00
Zixuan Chen
b11fe7394e
fix: yata fuzzing now works
2022-10-26 23:31:34 +08:00
Zixuan Chen
5ca3a42a0b
test: add fuzz and fix a few iter bugs
2022-10-26 23:31:34 +08:00
Zixuan Chen
670d194aeb
feat: impl yata
2022-10-26 23:31:34 +08:00
Zixuan Chen
5f6d66368e
fix: fix a few bugs
2022-10-26 23:31:34 +08:00
Zixuan Chen
1f69322bc4
chore: make id optional in yspan
2022-10-26 23:31:34 +08:00
Zixuan Chen
33992626d2
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
cd95e2276c
feat: introduce crdt-list
2022-10-26 23:31:34 +08:00
Zixuan Chen
e9100f300d
refactor: rename files
2022-10-26 23:31:34 +08:00
Zixuan Chen
36c9fd7340
feat: insert at cursor
2022-10-26 23:31:34 +08:00
Zixuan Chen
9240ad12ee
fix: add safety comment to rle
2022-10-26 23:31:34 +08:00
Zixuan Chen
bd1b0a2215
feat: init content map
2022-10-26 23:31:34 +08:00
Zixuan Chen
3b271b5ede
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
31b0fa3354
fix: insert / delete 0 length content
2022-10-26 23:31:34 +08:00
Zixuan Chen
2c11846c99
fix: notify fuzzy test
2022-10-26 23:31:34 +08:00
Zixuan Chen
1df1f1d2bf
fix: string fuzzy
2022-10-26 23:31:34 +08:00
Zixuan Chen
0d99ceb01c
feat: return cursor in iter
2022-10-26 23:31:34 +08:00
Zixuan Chen
77eac9eb30
fix: notify
2022-10-26 23:31:34 +08:00
Zixuan Chen
8f005180a4
feat: add withstartend
2022-10-26 23:31:34 +08:00
Zixuan Chen
6209de97a3
chore: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
96f29ee0fa
fix: range map
2022-10-26 23:31:34 +08:00
Zixuan Chen
a6cdf2e400
refactor: FindPosResult found field
2022-10-26 23:31:34 +08:00
Zixuan Chen
6851934ba6
refactor: rename field
2022-10-26 23:31:34 +08:00
Zixuan Chen
a9134a9844
refactor: find pos result
2022-10-26 23:31:34 +08:00
Zixuan Chen
72599b99d1
feat: notify
2022-10-26 23:31:34 +08:00
Zixuan Chen
66c50d4a9b
feat: cursor mut
2022-10-26 23:31:34 +08:00
Zixuan Chen
6181504664
refactor: move range map to rle
2022-10-26 23:31:34 +08:00
Zixuan Chen
02415676ea
fix: styling
2022-10-26 23:31:34 +08:00
Zixuan Chen
50b283493d
fix: cargo fix
2022-10-26 23:31:34 +08:00
Zixuan Chen
0ce9dbc309
feat: add index map
2022-10-26 23:31:34 +08:00
Zixuan Chen
067fb82058
feat: add rle global index tree trait
2022-10-26 23:31:34 +08:00
Zixuan Chen
04a20b08e1
refactor: use cumulate tree trait
2022-10-26 23:31:34 +08:00
Zixuan Chen
59f59b1c2e
feat: add cursor support
2022-10-26 23:31:34 +08:00
Zixuan Chen
29c4d2011e
feat: list init
2022-10-26 23:31:34 +08:00
Zixuan Chen
da8b2668e7
chore: cargo fix
2022-08-16 17:05:50 +08:00
Zixuan Chen
722893cdb2
chore: speed up example
2022-08-16 16:46:03 +08:00
Zixuan Chen
9c86dae038
chore: make bench harder
2022-08-16 16:46:03 +08:00
Zixuan Chen
7191668a65
fix: try merging parent after its children removed
2022-08-16 16:46:03 +08:00
Zixuan Chen
ec209f233e
chore: refine debug info
2022-08-16 16:46:03 +08:00
Zixuan Chen
3b091d8891
refactor: move bump pointer before Node
2022-08-16 16:46:03 +08:00
Zixuan Chen
9e66e2dc68
fix: fix a delete bug & init bench
2022-08-16 16:46:03 +08:00
Zixuan Chen
07cfc036b7
chore: add slow test config
2022-08-16 16:46:03 +08:00
Zixuan Chen
cb0701ebf0
test: add fuzzy test
2022-08-16 16:46:03 +08:00
Zixuan Chen
cdb83c0d03
refactor: simplify type
2022-08-16 16:46:03 +08:00
Zixuan Chen
9755782cf9
refactor: use ouroboros to self-ref
...
previous solution has a fatal bug when dropping
2022-08-16 16:46:03 +08:00
Zixuan Chen
f7db72d99e
chore: fix warnings
2022-08-16 16:46:03 +08:00
Zixuan Chen
12e29374dc
fix: use &mut instead of BumpBox for Node
...
using BumpBox for struct that contains data on the same Bump will cause undefined behavior
2022-08-16 16:46:03 +08:00
Zixuan Chen
7bef4eee93
test: fix test impl
2022-08-16 16:46:03 +08:00
Zixuan Chen
6a8087c756
fix: check err
2022-08-16 16:46:03 +08:00
Zixuan Chen
687fd45f61
chore: string fuzzy test setup
2022-08-16 16:46:03 +08:00
Zixuan Chen
34632f61c3
refactor: refine style
2022-08-16 16:46:03 +08:00
Zixuan Chen
4009bc0079
refactor: remove redundant fix_size_vec
2022-08-16 16:46:03 +08:00
Zixuan Chen
bd95ad42e4
chore: custom debug for leaf & internal
2022-08-16 16:46:03 +08:00
Zixuan Chen
e30ba86653
fix: update leaf cache when create new elem by del
2022-08-16 16:46:03 +08:00
Zixuan Chen
c8a83fe676
fix: post delete handler
2022-08-16 16:46:03 +08:00
Zixuan Chen
6ab3565bd8
chore: cargo fix
2022-08-16 16:46:03 +08:00
Zixuan Chen
8807d43eca
fix: cache error
...
- add cache check
- add borrow from siblings test
2022-08-16 16:46:03 +08:00
Zixuan Chen
e19fb6a91b
feat: delete range
...
and fix several insertion bugs
2022-08-16 16:46:03 +08:00
Zixuan Chen
1f0f502be5
fix: fix insertion err
...
did not inc level
2022-08-16 16:46:03 +08:00
Zixuan Chen
460baf4cbf
chore: rm dbg!
2022-08-16 16:46:03 +08:00
Zixuan Chen
550bce2815
feat: delete
2022-08-16 16:46:03 +08:00
Zixuan Chen
3c96a6b224
feat: insertion
2022-08-16 16:46:03 +08:00
Zixuan Chen
028e3ba3f9
feat: rle tree insert
2022-08-16 16:46:03 +08:00