Document the cost of routing high-frequency messages through deep reducer stacks
- Dominant language
- Rust
- Stars
- 9
- Forks
- 1
- Avg merge
- 11h 46m
- Merged PRs (30d)
- 62
Description
## Summary
Document what routing a high-frequency message through a deep reducer stack
costs, so an application choosing between a flat `Application` and a composed
stack can weigh the cost against the separation it buys.
This is the one remaining acceptance criterion of #322; the runnable example
(`examples/dashboard_composed.rs`) and the decision guide (`docs/composition.md`)
landed in #360.
## Scope
- The per-boundary cost of a claimed message: what each boundary does to a
command on the way out (`Command::map`'s boxing, one `Command::scoped` call,
one `Subscription::scoped` call per declaration) and what it does to a message
on the way in.
- What that costs at a terminal-input or timer cadence, and at what stack depth
it stops being noise.
- Source-side coalescing as the answer when the cadence is the problem rather
than the depth.
- `Command::without_redraw()` and where it belongs in an update that runs often.
## Constraints
Every number in the guidance must come from a run of a bench in this repo, not
from reasoning about the code, and the guidance must say which bench produced
it so it can be re-measured. Where a cost cannot be measured with what exists,
say what is not known rather than estimating it — or add the bench.
Nothing here reopens RFC 0014: this is guidance about a cost, not a change to
what a boundary does.
## Acceptance criteria
- [ ] `docs/composition.md` gains a section on the cost of routing
high-frequency messages through deep reducer stacks.
- [ ] It covers `Command::map` boxing, source-side coalescing, and
`without_redraw()`.
- [ ] Every quantitative claim names the bench that produced it.
Contributor guide
Assessment
This issue has not been assessed yet.