Skip to content

Fix cascading update guard diagnostics#11577

Open
ryanflorence wants to merge 1 commit into
mainfrom
ryanflorence/fix-cascading-update-guard
Open

Fix cascading update guard diagnostics#11577
ryanflorence wants to merge 1 commit into
mainfrom
ryanflorence/fix-cascading-update-guard

Conversation

@ryanflorence

Copy link
Copy Markdown
Member

The scheduler's cascading update guard used one per-turn counter for all component updates. That meant a large batch of legitimate clientEntry hydration/update work could look like an infinite loop and stop later components from becoming interactive.

This keeps the performance signal while making the hard guard more precise. The runtime now warns once per event-loop turn when aggregate cascading component updates cross the threshold, but only dispatches the infinite-loop error when the same component instance repeatedly updates itself.

Closes #11222.

  • Adds component-name/count diagnostics to the aggregate warning and hard error
  • Tracks the hard error limit per component instance instead of globally
  • Preserves the existing protection for handle.update() loops during render
  • Adds a regression for 60 component instances updating in the same event-loop turn

@github-actions

Copy link
Copy Markdown
Contributor

Preview Build Available

A preview build has been created for this PR. You can install it using:

pnpm install "remix-run/remix#preview/pr-11577&path:packages/remix"

This preview build will be updated automatically as you push new commits.

@ryanflorence

ryanflorence commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

@sbaleno mind trying this patch out for #11222?

@sbaleno

sbaleno commented Jul 1, 2026

Copy link
Copy Markdown

@ryanflorence All good here now - thank-you

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.

Improve MAX_CASCADING_UPDATES guard: warn with component breakdown instead of silent failure

2 participants