fix: harden diff calc for shallow text histories#974
Open
lodyai[bot] wants to merge 3 commits intomainfrom
Open
fix: harden diff calc for shallow text histories#974lodyai[bot] wants to merge 3 commits intomainfrom
lodyai[bot] wants to merge 3 commits intomainfrom
Conversation
3fe34d7 to
ece7e91
Compare
Contributor
WASM Size Report
|
ece7e91 to
6ca863b
Compare
6ca863b to
f91a3f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diff_calcfuzz target plus focused regression coverage for shallow text, state-only, tracker, and LCA cases.Performance
Quick Criterion comparison against
origin/mainafter rebasing:import_regression/text_split_checkout_1024:origin/main4.3524 ms, branch 4.5337 ms, about +4.2% median.import_regression/list_checkout_4096x1024:origin/main4.7133 ms, branch 4.9708 ms, about +5.5% median.This was a short run with 10 samples, 1s warmup, and 3s measurement time, so treat it as directional. The list case intervals overlap; this does not look like a large regression, but the text checkout path is a little slower in this sample.
Validation
cargo fmt --all --checkcargo test -p fuzz diff_calc --test test -- --nocapturecargo fuzz run diff_calc fuzz/artifacts/diff_calc/*cargo fuzz run diff_calc ~/loro-fuzz/corpus/diff_calc -- -max_total_time=18000: 304119 runs in 18001s, no crash. This long run was before the final conflict-free rebase; post-rebase focused tests were rerun.cargo test -p loro state_only -- --nocapturecargo test -p loro-internal common_ancestor --lib -- --nocapturecargo test -p fuzz one_doc_tree_move_before_cycle_error_is_ignored --test test -- --nocapturecargo check -p loro-internal