Dev diagnostics: attribution cost checks (WIDE_SCOPE_DEPS at 30) now on by default via performance tracks, and count HMR plumbing
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, typescript
- Domain
- devtools, performance
Research direction
Start with packages/signals/src/core/attribution.ts, especially checkDepWidth and the wideDeps threshold, then read packages/solid/src/refresh/index.ts to trace the _plumbing memos. Compare that behavior with the performance-tracks attribution holder and decide which documented diagnostic behavior should apply. Done means the default dev session no longer produces an unintended warning, or the intended default and coverage are clearly established.
Written by the indexing model from the issue text.
Description
Summary
Since @solidjs/vite-plugin loads the Chrome Performance panel tracks in every dev session (next.47), the attribution engine is enabled by default in dev with its cost checks on. WIDE_SCOPE_DEPS — designed as an opt-in close-up lens at a threshold of 30 — now fires on ordinary code. The first case found isn't even user code: it counts the HMR wrapper's plumbing memos.
Reproduction
examples/hackernews-spa on @solidjs/[email protected], pnpm dev, load any 30-story feed page:
[WIDE_SCOPE_DEPS] effect "effect" is subscribed to 30 sources — it re-runs when any of them change.
Narrow its reads or split it into smaller memos. Sources: anonymous, anonymous, anonymous, …
in <Document> › body.children › <App> › <Router> › … › <Stories> › effect › effect
The same app on plugin next.35 is silent (attribution was not enabled there).
What the 30 sources are
<For> itself tracks only the list (mapArray returns one accessor). The sources come from dev-only HMR:
- In dev,
$$component(solid-js/refresh) wraps every component instance, andHMRCompreturns acreateMemo(..., { _plumbing: true, transparent: true })instead of the component's node (packages/solid/src/refresh/index.ts). - Each of the 30
<Story>rows is therefore a memo accessor, not an<li>. - The
<For>sits in aninsertwith noname(henceeffect › effect); its inner effect normalizes the mapped array, calling every function it finds under tracking → 30 plumbing memos.
In production Story returns its <li> and the insert tracks nothing per row. Tracking the memos is correct (the insert must follow them for a hot swap), but the wrapper's comment says plumbing memos are "unrecorded by the attribution engine", while checkDepWidth (packages/signals/src/core/attribution.ts) counts every dep, plumbing included.
Why it now shows by default
- The threshold never moved:
wideDeps: 30since the prototype (1386b9c31) and #3018 (3d2c21fe8), whose docs describe it as: "fires at a much lower threshold, but only while the attribution engine is enabled — it names the offending sources.HUGE_FAN_INis the always-on backstop for the pathological case."HUGE_FAN_INisGRAPH_SIZE_WARN_AT = 2000(packages/signals/src/core/dev.ts). - Performance tracks (#3580) take a hold with
attribution.enable({ log: false, ...options.attribution })and leavechecksat the engine default (true); the adapter's own comment says to passchecks: false"for records only". @solidjs/vite-pluginnext.47 imports the tracks module into every dev client entry (performanceTracksdefaults on underserve).
Net effect: the opt-in lens became an always-on default-dev warning at a threshold calibrated for someone already looking.
Options (not mutually exclusive)
- Tracks don't take the cost checks — the performance-tracks hold passes
checks: false(records only, as its comment describes).WIDE_SCOPE_DEPSstays the opt-in lens it was designed as. Behavior change: all five cost checks (hotRuns,hotTime,wideDeps,unstableMemos,wideWrites) go quiet in default dev unless another holder asks for them. - Raise the default (≈1000) if the cost checks are meant to be default-on now. Then
WIDE_SCOPE_DEPSandHUGE_FAN_IN(2000, always on) largely overlap and the case for two separate checks weakens. - Exclude
_plumbingsources from the width count regardless of the threshold — HMR plumbing shouldn't count against a scope, at any size. Worth auditing the other per-source attribution checks for the same gap.
All three are dev-diagnostics behavior changes (@solidjs/signals, @solidjs/web).
Possibly related (unverified)
examples/chat on the same plugin logs repeated ABANDONED_FLIGHTS ("computed" abandoned 3 flights in 1000ms) under <App> › <For> › <Loading> › children › <Reply> › computed › computed while a reply streams — each streamed chunk supersedes the previous pending value. <Reply> also goes through the HMR wrapper, so this may be the same plumbing blind spot or a separate calibration problem for streamed sources; not traced yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 1.1k
- Avg merge
- 9h 33m
- Merged PRs (30d)
- 262
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from solidjs/solid
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
solidjs/solid#3766 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
area/dashboard kind/bug QA/dev-automation
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
rancher/dashboard#19379 · 2 comments ·
Maintainers usually reply within 5 days
-
perf(core): getComments() runs the approved count and the comment list as two sequential queriesOpenarea/core bot:bug bot:working
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
emdash-cms/emdash#3905 · 2 comments ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 90/100
lingdojo/kana-dojo#31728 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
selective-claw: freshTailTurns=0 keeps ALL turns verbatim and summarizes none (slice(-0) === slice(0))Possibly taken @zjncs claimed this today. Opencomponent:tokenless
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
agentic-os-org/ANOLISA#6112 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rjsf-team/react-jsonschema-form#5439 ·
Maintainers usually reply within 1 day