fix(store): release dormant computed dependencies without reconnecting graphs #376
main fromrefs/pull/376/head·opened Computed atoms currently stay reachable through source subscriptions after an unobserved read, so sources can retain unused derived graphs indefinitely. Keep dormant forward dependencies without reverse subscriptions, validate cached dependency revisions, and reconnect only for real observation. Reuse attached links through a small observed-read path while preserving snapshot identity, custom equality, and captured getters.
Fixes #372. This is an alternative to #373 and does not modify that PR.
Prior validation passed 254 runtime tests (1 skipped), an 80,000-step graph oracle, four TypeScript versions, build, lint, and package checks. No new checks were run for publishing, as requested.
Measured against current main: observed chains at depths 8/32 are 3.9%/2.8% slower and diamond updates 5.3% slower. Dormant depth-128 validation is about 40× faster than #373. Unchanged subscription churn is 23.7% faster than main; changed subscription churn is 16.1% slower. The createAtom gzip bundle is 1,924 bytes versus main's 1,504 and #373's 1,754; size optimization remains a follow-up.
See reproducible hot-path measurements for the methodology, raw results, and tradeoffs.
- 1
View your CI Pipeline Execution ↗ for commit 5164d67f07d910f5145c5a36f3befd0e24186b34
Command Status Duration Result nx affected --targets=test:sherif,test:knip,tes...✅ Succeeded 2m 25s View ↗ nx run-many --target=build --exclude=examples/**✅ Succeeded 1s View ↗
☁️ Nx Cloud last updated this comment at
2026-10-03 11:14:21UTCNavigate logical layers of code changes, visualize relationships, and explore their blast radius.
Important
Draft PR not reviewed#
Draft PRs are not automatically reviewed by default.
- Trigger a manual review
To automatically review draft PRs, update your CodeRabbit configuration:
reviews: auto_review: drafts: true✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment `@coderabbitai help` to get the list of available commands.@tanstack/angular-store
npm i https://pkg.pr.new/@tanstack/angular-store@376@tanstack/lit-store
npm i https://pkg.pr.new/@tanstack/lit-store@376@tanstack/octane-store
npm i https://pkg.pr.new/@tanstack/octane-store@376@tanstack/preact-store
npm i https://pkg.pr.new/@tanstack/preact-store@376@tanstack/react-store
npm i https://pkg.pr.new/@tanstack/react-store@376@tanstack/solid-store
npm i https://pkg.pr.new/@tanstack/solid-store@376@tanstack/store
npm i https://pkg.pr.new/@tanstack/store@376@tanstack/svelte-store
npm i https://pkg.pr.new/@tanstack/svelte-store@376@tanstack/vue-store
npm i https://pkg.pr.new/@tanstack/vue-store@376commit:
5164d67Sheraff(GitHub profile, opens in a new tab) linked this to fix #372
Sign in to join this conversation.
🦋 Changeset detected#
Latest commit: 5164d67f07d910f5145c5a36f3befd0e24186b34
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR