Diagnostics

HUGE_FAN_IN

One recompute tracked 2000 sources (always on).


What you saw

  • Kind: graph
  • Severity: warn (code that works but is structurally wrong or expensive)

The console report opens with [HUGE_FAN_IN] and the message, then an in line naming the owners that enclose the subject, root first, and an at line with the source location when the code was compiled with one. In a captured artifact the same finding is an event with code: "HUGE_FAN_IN", ownerPath, and loc. Diagnostics explains each line.


Why it fires

The always-on backstop: one computation tracked 2000 or more sources in a single pass, so it re-runs when any of them change. The message names the computation and the count (data: { count }); it does NOT list the sources.

Performance pathologies (from the attribution engine)

These fire only while attribution is enabled and describe cost, not incorrect behavior. The numbers in the message are measurements, not guesses.


How to fix it

To see which sources, enable the attribution engine and read WIDE_SCOPE_DEPS, which fires earlier (200 sources) and names up to 12 of them. The repair is the same: narrow the reads or split the derivation into smaller memos that each track only what they need.


In tests

captureArtifact from @solidjs/diagnostics runs a scenario with the diagnostics channel open and returns the events it saw. expectNoDiagnostics(artifact) fails while HUGE_FAN_IN is among them, with the events as evidence; after the fix, the code is gone from artifact.diagnostics. expectRerunBudget(artifact, max, { scope }) bounds how often a named scope may re-run after a write. It reads the attribution records, which captureArtifact collects unless attribution: false is passed. Check for regressions in tests shows the loop and the Vitest matcher form.


Learn more

  • Diagnostics: every code, with its kind, severity, and trigger.
  • Debugging reactivity: how to read a report and what each group of codes points at.
  • Attribution: the engine whose records explain a re-run, a hold, or a waterfall.
Last updated: 10/15/26, 10:07 PMEdit this pageReport an issue with this page