Repository navigation
quest: plan linear route show cost for lite-07 sessions #8385
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # [M] Showing an identity's claims costs the claims that changed | ||
|
|
||
| ## Goal | ||
|
|
||
| A lite-07 session's setup and teardown cost grows linearly with the | ||
| broadcasts it carries, as lite-06's does. One identity holding many claims no | ||
| longer makes `show` in `rs/moq-net/src/route/mod.rs` quadratic. The session | ||
| bench (`rs/moq-net/benches/session`) and the route bench | ||
| (`rs/moq-net/benches/routes.rs`) show it, swept over both axes as the | ||
| repository's fan-out rule requires. | ||
|
|
||
| ## Plan | ||
|
|
||
| Planned 2026-11-09 (maintainer, /quest-complete follow-up of | ||
| [moq-dev/moq#8352](https://github.com/moq-dev/moq/pull/8352)). β m2, in this | ||
| epic (rejected: m4, dropping it). | ||
|
|
||
| #8352's session bench measured lite-07 setup at 4096 broadcasts at 4.9 s of | ||
| CPU, against 0.5 s for lite-06, and teardown the same. It traced this to | ||
| showing one identity's claims: every change re-derives what the identity | ||
| shows from all of its claims. That ran on main after | ||
| [moq-dev/moq#8293](https://github.com/moq-dev/moq/pull/8293) (routes presented | ||
| incrementally), but before | ||
| [moq-dev/moq#8374](https://github.com/moq-dev/moq/pull/8374) (a relay folds | ||
| received route batches by the claims they change). | ||
|
|
||
| Re-measure on current main first. If #8374 already made it linear, record the | ||
| numbers in the PR and delete this quest. Otherwise keep what `show` derives up | ||
| to date per changed claim instead of recomputing it, and add a route-bench | ||
| case swept over claims per identity and claims changed. | ||
|
|
||
| Public API: none expected. Wire: none. | ||
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback here describes work that already exists:
Router::showtakes theDirty { all, claims }short-circuit and recomputes onlydirty.claimsunless the identity's context changed, and the existing route bench already sweeps both relevant shapes (watched/unwatchedover claims Γ streams,receivedover claims Γ changes). Because #8374 merged before this commit, its publishedreceivednumbers (10,000 claims Γ 1: 4.77 ms β 1.58 Β΅s) suggest the re-measure may be the whole task. If the cost survives, the plan should name how to find the real hot path (Node::homeand the view merge are the other candidates) rather than prescribe code that already ships.Technical details