Skip to content

perf: spend less of a board's CPU and memory on each watcher push - #298

Merged
GraemeF merged 7 commits into
mainfrom
bdi-e8pu
Oct 9, 2026
Merged

GraemeF merged 7 commits into
mainfrom
bdi-e8pu

Conversation

@GraemeF

@GraemeF GraemeF commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

A board now does less work on a watcher push that moves little or nothing, and holds less in memory, while drawing exactly what it drew before.

  • A board skips its read of an answer that moved nothing. Each answer is numbered by the change that last moved its beads, and the beads are shared between answers instead of copied.
  • A project read only for what another project's trees reach in it assembles no trees of its own.
  • The trees that reach across projects are kept until a read they were assembled from changes.
  • The forest keeps a tree's facts while a collection leaves that tree unchanged.

On the board benchmark under bench/boards/, each board's CPU per watcher read fell to between a quarter and a half of what it was on main, and its steady memory fell by more than 40%. The runs alternated main and this branch.

The watcher sends only the beads that changed, so an answer of a
freshness line alone leaves a board's read where it stood. Each answer
is numbered by the change that last moved its beads, which a board
compares as a fingerprint, and the beads are shared rather than copied
between answers and into the board's read.
A project read only for what another project's trees reach in it draws
no trees of its own, so its read assembles none. The standing read
records whether it assembled them, so a project the run later reads for
itself is read again.
A collection that read nothing new assembled every tree waiting on another project's bead again, reading the edges of every project's answer to do it. It now keeps those trees until a read they were assembled from is replaced.
A collection that moves nothing used to work out every tree's facts again.
The forest now carries a tree's facts over when the tree arrives equal to the
one it answered before.
@GraemeF
GraemeF merged commit df740d6 into main Oct 9, 2026
2 checks passed
@GraemeF
GraemeF deleted the bdi-e8pu branch October 9, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant