perf(sync): benchmark and optimize scoped first-view sync paths#104
Merged
Antonov548 merged 59 commits intomainfrom Apr 3, 2026
Merged
perf(sync): benchmark and optimize scoped first-view sync paths#104Antonov548 merged 59 commits intomainfrom
Antonov548 merged 59 commits intomainfrom
Conversation
665a5da to
cdedf03
Compare
9e36164 to
4e30592
Compare
4e30592 to
379d7e9
Compare
Antonov548
approved these changes
Apr 3, 2026
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.
What This Adds
--first-viewmetric so sync time and first local read time are measured separatelyBenchmark Results
Reference first-view case: open a known node, fetch its first 10 immediate children, and include
512Bpayloads.Fresh First View: Before vs After
10kopen path:18.06stotal, with about17.91sin serverlistOpRefs(children)26.77stotal, with about26.55sin serverlistOpRefs(children)10ktree:27.5mstotal time to first view,27.1mssync,0.38msfirst local read100ktree:27.6mstotal time to first view,27.2mssync,0.50msfirst local read100ktree:227.2mstotal time to first view,226.9mssync,0.79msfirst local readSame Subtree Re-Sync On A Non-Empty Client
10k:41.0mssync-only100k:59.2mssync-only10k:38.2mssync-only100k:56.5mssync-onlyWhat These Numbers Cover
Setup Cost Measured Separately
100kfirst-view case is about108.2s, and this PR measures that separately so upload/setup does not get mixed into the open-path numbersScope
This PR is about scoped first-view sync and subtree re-sync performance.
The later large-doc hot-write benchmark suite and its setup optimizations live in #113.