Skip to content

Recalc: an array that spills as before doesn't requeue its dependents - #1061

Merged
aiongg merged 1 commit into
storytold:mainfrom
nihilist-narwhal:fix-unchanged-spill-dependents
Oct 22, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
nihilist-narwhal:fix-unchanged-spill-dependents

Conversation

@nihilist-narwhal

Copy link
Copy Markdown
Contributor

After each round, every evaluated array formula queued the dependents of its spill area again, even when it spilled the same area with the same values. Two arrays that read each other's spill areas kept queuing each other until the 8-round limit: with two 200-row arrays like that and 3,000 formulas reading them, one input change evaluated 21,030 formulas instead of 16 (20 edits: 285 ms → 0.4 ms in a release build). An unchanged spill (same area, same values, nothing new in the way) now leaves its dependents alone, and last_recalc_cells counts the formulas of every round, which the test uses.

It shares recalc.rs with #208 and the Python-in-cells PRs (#469 and up); they merge cleanly with it.

After each round, every array formula that was evaluated queued the
dependents of its spill area again, even when it spilled the same area
with the same values. Two arrays that read each other's spill areas
then queued each other in every round, up to the limit of 8: one edit
evaluated 24 formulas instead of 3. An unchanged spill now leaves its
dependents alone. last_recalc_cells counts the formulas of all rounds.
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.

2 participants