Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: use a priority-queue-based search for updating text #544

Merged
merged 6 commits into from
Nov 9, 2024
Merged

Conversation

zxch3n
Copy link
Member

@zxch3n zxch3n commented Nov 8, 2024

Resolve #543.

This method tends to produce diffs with more continuous edits, which is more efficient when applying them to CRDTs.

@zxch3n zxch3n marked this pull request as ready for review November 8, 2024 13:16
@zxch3n zxch3n requested a review from Leeeon233 November 8, 2024 13:16
@zxch3n zxch3n merged commit 4f0d499 into main Nov 9, 2024
1 check passed
@zxch3n zxch3n deleted the fix-543 branch November 9, 2024 08:35
rteqs pushed a commit to rteqs/loro that referenced this pull request Nov 13, 2024
* perf: use a priority-queue-based search for updating text

It tends to produce diffs with more continuous edits,
which is more efficient when we need to apply them to CRDTs

* fix: use better text diff calc

* refactor: add text update options struct

* chore: update text.update comments

* chore: fix warnings

* fix: rm a dumb optimization
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LoroText.update(targetStr) may not capture the edit intent
1 participant