Repository navigation
Conversation
After #1222 routed production replays through the filtered entry point, `iter_from_replay_base_causally` is only called from tests, which made `cargo clippy -- -Dwarnings` fail with dead_code. Point the doc references at `try_iter_from_replay_base_causally`, the production entry point. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
WASM Size Report
|
Member
Author
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.
Stacked on #1222. The first three commits are #1222 by @serg-and, unchanged; only the last commit (fe33ee1) is new. #1222 does not allow maintainer edits, so the fix could not be pushed to its branch. Merging this supersedes #1222.
Summary
#1222 fixes two costs that grow quadratically with the number of peer ids a document has seen:
try_shrink_frontierswalked ancestors once per candidate. It now walks once per retained head, andtry_vv_to_frontiersreturns the maintaineddag.frontierswhen asked for the current version.replay_container_ops_from_empty) rebuilt a full version vector for every historical change. It now skips changes that have no op on the container before building one.The new commit only puts
iter_from_replay_base_causallybehind#[cfg(test)]. After #1222 it is called only from tests, socargo clippy -- -Dwarningsfailed withdead_code. The doc references now point attry_iter_from_replay_base_causally, the production entry point.Validation
cargo test -p loro-internal -p loro --features loro-internal/test_utils,loro/jsonpath: 1647 passed, 0 failed.cargo fmt --all -- --check: clean.cargo clippy -p loro-internal --all-features -- -Dwarnings: thedead_codeerror is gone. The 3 errors left (loro.rsquestion-mark,query_by_len.rsdoc indentation) are also onmainwith current stable clippy.Notes
Continue(())where perf: stop the frontier walk at nodes with a cached version vector #1244 changes the callback toControlFlow<(), bool>. perf: stop the frontier walk at nodes with a cached version vector #1244's cached-vv stop would also land in the test-onlyshrink_frontiers_reference, not in the production walk. It needs to be redone in the new walk.🤖 Generated with Claude Code