Skip to content

perf: cache and use speed-up (variable-level deps, lazy restore, static use digests, use prefetch, slider debounce) - #55

Merged
NiJingzhe merged 9 commits into
release/2.2.6.post1from
feat/project-reactive-graph
Oct 20, 2026
Merged

NiJingzhe merged 9 commits into
release/2.2.6.post1from
feat/project-reactive-graph

Conversation

@NiJingzhe

Copy link
Copy Markdown
Collaborator

Cache and runtime speed work, measured on the desktop six-axis arm (sandbox-envs/desktop_arm_sources, tools/profile_arm6.py):

before now
cold 80.5 s 34.6 s
nothing changed 23.6 s 4.0 s
one joint edited 18.2 s 3.0 s
cache on disk 1.7 GB 96 MB
  • variable-level dependencies on local modules (runtime/names.py)
  • cheaper shape restore, shapes built on first use, no private values stored, compressed cell cache
  • scad.var / expressions keyed by content (marimo CustomStub)
  • use followed per call by literal path, kernel caches such cells (runtime/children.py)
  • process-level use prefetch (SCA_JOBS), worth-it threshold, state-dir lock (runtime/prefetch.py)
  • editor slider drag sent when it settles (editor-web/src/lib/settle.ts)

Full suite: 2208 passed, 29 skipped. Not done: statement-level increments inside one cell.

Targets the release branch so it ships in 2.2.6.post1 together with #54.

🤖 Generated with Claude Code

NiJingzhe and others added 9 commits October 20, 2026 22:10
… file

from lib.dims import A now keys the cell on the definition of A and what it
reads (across local modules); anything unprovable falls back to the file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…metry

Adding a child no longer refreshes the subtree's tag cache unless a tag can
pass down; restore indexes entities by position and refreshes tag caches once;
the cell cache stores no underscore names' values; BinTools bytes are zlib'd.
Desktop-arm benchmark: no-change run 23.6s -> 7.0s.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A drag shows its own value and is sent after 250 ms without a change, or at
once on release; clicks and number-box commits still go at once.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…dir lock

A cell that uses notebooks by literal path is keyed by what each of them is,
and the kernel caches such cells; the use calls a cell is about to make are
started together in worker processes (SCA_JOBS), when that is worth the
seconds a worker takes to start; a notebook's state directory is locked
between processes. Desktop-arm benchmark: cold 80.5s -> 34.6s.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.2.6.post1 made every add-on command fail with VersionSpecError.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@NiJingzhe
NiJingzhe merged commit 7fcf022 into release/2.2.6.post1 Oct 20, 2026
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