Commit graph

243 commits

Author SHA1 Message Date
Zixuan Chen
f648b353ad
chore: upgrade rust crates 2024-02-16 11:30:56 +08:00
Zixuan Chen
57287fa6d8
chore: add pkg info 2024-02-16 11:25:12 +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
cccb4f3957
perf(wasm): reduce wasm size (#198) 2023-11-29 13:59:39 +08:00
Zixuan Chen
208c673b2d
refactor: list now use the same tracker as text (#197)
Resolve #122
2023-11-29 10:45:00 +08:00
Zixuan Chen
564dde7703
chore: publish mvp rust api 2023-11-28 21:29:11 +08:00
Zixuan Chen
8bd953e396
refactor: extract text chunk (#153) 2023-11-04 20:03:43 +08:00
Zixuan Chen
74138231aa
refactor: remove the use of RleVec<[T; 0]> (#131) 2023-10-31 17:54:37 +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
Zixuan Chen
345b5bbcb9
perf: speedup when there are many peers 2023-09-02 18:19:34 +08:00
Zixuan Chen
902fe38570
chore: fix warnings and format 2023-08-28 09:41:23 +08:00
Zixuan Chen
c105ff2220
Feat: checkout to target version & use unicode index by default (#98)
* feat: checkout to frontiers

* feat: record timestamp

* fix: use unicode len by default for text
now "你好" has length of 2 instead of 6

* chore: rm dbg!
2023-08-04 10:45:23 +08:00
Zixuan Chen
2a0f842fc5 fix: lamport issue 2023-07-12 18:47:04 +08:00
Zixuan Chen
3638e3d0ed fix: fix a encode/decode issue
exposed by fuzzing test
2023-07-12 18:17:57 +08:00
Zixuan Chen
8ebd41fa3d feat: connect diff calculator 2023-07-12 00:29:23 +08:00
Zixuan Chen
1f827f944e feat: basic pipeline for text 2023-07-10 23:17:39 +08:00
Zixuan Chen
a90218f229 chore: fix all warnings 2023-07-10 21:37:30 +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
bd4060c591 refactor: make remoteOp a borrowed type 2023-07-05 18:20:50 +08:00
Zixuan Chen
f0f82fb581 refactor: seal change exp impl 2023-07-05 14:43:58 +08:00
Zixuan Chen
82b5f8dc90
Perf: speed up utf16 and wasm (#90)
* perf: remove unused transact field

* perf: micro optimization

* bench: fix bench

* bench: add utf16 bench

* chore: refine diagnose

* perf: speedup utf16 lookup

* perf: use better utf16 len counter

* refactor: use js to cast Loro/Transaction

* refactor: map and list use __loro and __txn

* test: configure ci vitest

* chore: ci
2023-04-03 09:29:25 +08:00
leeeon233
f6ad5460cb Merge branch 'perf-encode-size' into feat-transaction 2023-03-09 10:45:29 +08:00
leeeon233
9544e27be4 feat: add delta compose 2023-03-01 14:12:05 +08:00
leeeon233
5b22a1e9aa fix: encode use dep_on_self
Co-authored-by: Zixuan Chen <me@zxch3n.com>
2023-02-22 14:10:21 +08:00
Zixuan Chen
9d31605bde fix: cursor get_sliced should have len > 0 2023-01-30 18:04:57 +08:00
Zixuan Chen
a03c68a993
fix: make LoroCore: Send + Sync (#61) 2023-01-06 21:03:11 +08:00
Zixuan Chen
fd65b1504c Merge branch 'main' into perf-wasm-analysis 2022-12-27 12:57:16 +08:00
leeeon233
4748e1d38c fix: decode hierarchy for snapshot mode
update columnar version, reduce compression time
2022-12-19 18:07:24 +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
f322bde4c9 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-13 16:18:56 +08:00
Zixuan Chen
90fe4cc69e fix: remove needless check 2022-12-12 16:18:55 +08:00
Zixuan Chen
dc4229d609 perf: reduce heap allocations 2022-12-12 16:01:58 +08:00
Zixuan Chen
313b1cc8c0 bench: add wasm bench to web test 2022-12-12 13:44:49 +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
569cfdcf5e perf(rle): use simple iter range for range_map 2022-12-09 10:46:55 +08:00
Zixuan Chen
1933fe6a56 fix: refine rangemap interface 2022-12-07 11:03:10 +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
Zixuan Chen
2604c4a3fb refactor: make internal and leaf use same type of cache 2022-12-06 16:21:48 +08:00
Zixuan Chen
c25500df04 feat: introduce rope 2022-12-06 16:21:48 +08:00
Zixuan Chen
f757b86f5c
Fix: unsound (violate borrow stack rules) bugs detected by Miri (#32)
* fix: borrow stack bugs exposed by miri

* fix: use context to track notify when integrating

* fix: miri bugs

* fix: borrow stack bugs

* fix: set range miri err
2022-12-06 16:05:58 +08:00
Zixuan Chen
610a651b5c fix: vec slice is ill defined 2022-12-06 15:50:35 +08:00
Zixuan Chen
134866bf3d chore: rm unused fn 2022-12-06 15:40:56 +08:00
Zixuan Chen
45c1a2e791 fix: decode deps 2022-11-30 23:55:58 +08:00
Zixuan Chen
d3a0d10b12 feat: encode updates 2022-11-30 23:55:58 +08:00
leeeon233
4ed1eaee32 feat: add list notify
Co-authored-by: Zixuan Chen <me@zxch3n.com>
2022-11-24 15:34:23 +08:00
Zixuan Chen
59bdaae250 refactor: use import context & basic notify
Co-authored-by: Leonzhao <leeeon233@gmail.com>
2022-11-24 12:15:25 +08:00
Zixuan Chen
1ae9bf2a48 feat: init delta 2022-11-23 16:26:38 +08:00
Zixuan Chen
c9e3a67963 test: fix range map tests 2022-11-18 00:32:18 +08:00
Zixuan Chen
521615b1a0 perf: replace returned vec with iterator 2022-11-18 00:32:18 +08:00