Repository navigation
Recalc: an array that spills as before doesn't requeue its dependents - #1061
Merged
aiongg merged 1 commit intoOct 22, 2026
Merged
Conversation
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.
This was referenced Oct 15, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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_cellscounts the formulas of every round, which the test uses.It shares
recalc.rswith #208 and the Python-in-cells PRs (#469 and up); they merge cleanly with it.