Skip to content

breaking(internals): iterative batched invalidateDependents (scale)#3283

Open
dmaskasky wants to merge 1 commit intopmndrs:mainfrom
dmaskasky:iterative-batched-invalidate-dependents-experiment
Open

breaking(internals): iterative batched invalidateDependents (scale)#3283
dmaskasky wants to merge 1 commit intopmndrs:mainfrom
dmaskasky:iterative-batched-invalidate-dependents-experiment

Conversation

@dmaskasky
Copy link
Copy Markdown
Collaborator

@dmaskasky dmaskasky commented Mar 30, 2026

Summary

invalidateDependents is called inside a for loop in mountDependencies. InvalidateDependents involves deeply traversing dependents. To help improve performance, this PR moved invalidateDependents out of the for loop and changes the invalidateDependents api to accept a list of atoms.

The breaking change is changing invalidateDependents to accept atom list.

Check List

  • pnpm run fix for formatting and linting code and docs

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
jotai Ready Ready Preview, Comment Apr 1, 2026 6:11pm

Request Review

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Mar 30, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 30, 2026

More templates

npm i https://pkg.pr.new/jotai@3283

commit: f0c0226

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

LiveCodes Preview in LiveCodes

Latest commit: f0c0226
Last updated: Apr 1, 2026 6:10pm (UTC)

Playground Link
React demo https://livecodes.io?x=id/EDJMKNU8Z

See documentations for usage instructions.

@dmaskasky dmaskasky changed the title Iterative batched invalidate dependents experiment breaking: iterative batched invalidate dependents Mar 30, 2026
@dmaskasky dmaskasky changed the title breaking: iterative batched invalidate dependents breaking: iterative batched invalidateDependents Mar 30, 2026
@dmaskasky dmaskasky force-pushed the iterative-batched-invalidate-dependents-experiment branch from 3919ab8 to 2d3a5d4 Compare April 1, 2026 18:04
@dmaskasky dmaskasky force-pushed the iterative-batched-invalidate-dependents-experiment branch from 2d3a5d4 to f0c0226 Compare April 1, 2026 18:10
@dmaskasky dmaskasky changed the title breaking: iterative batched invalidateDependents breaking(internals): iterative batched invalidateDependents Apr 3, 2026
@dmaskasky dmaskasky changed the title breaking(internals): iterative batched invalidateDependents breaking(internals): iterative batched invalidateDependents (scale) Apr 3, 2026
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.

1 participant