You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7d723f8
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(signals): report undefined-output runs as changed so every waste consumer agrees
The exemption for runs that commit `undefined` lived only inside
checkWastedRecompute, so the RerunEvent still said `changed: false` and
costs().wastedMs, expectNoWaste, the performance tracks and the why-run
log kept counting projection and writing-memo runs as waste. Apply it to
`changed` in recomputeEnd instead, mirroring the effect-output rule, and
drop the noValue parameter. This is the documented behavior: an
`undefined`-output compute reports `changed: true` and is exempt.
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Copy file name to clipboardExpand all lines: .changeset/wasted-recompute-undefined-output.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,4 +2,4 @@
2
2
"@solidjs/signals": patch
3
3
---
4
4
5
-
`WASTED_RECOMPUTE` no longer counts a re-run that committed`undefined` as waste. A projection that mutates its draft, or a memo that does its work by writing a signal, has no output to compare, so its re-runs were reported as pure cost.
5
+
A re-run that commits`undefined`is no longer counted as waste. A projection that mutates its draft or reconciles a returned value, or a memo that does its work by writing a signal, has no output to compare, so its re-runs were reported as pure cost. `RerunEvent.changed` now reports `true` for these runs (as it already did for side-effect-only effects), so `WASTED_RECOMPUTE` no longer fires for them and `costs().wastedMs`, `expectNoWaste` and the performance tracks stop counting them as wasted.
0 commit comments