Skip to content

fix: wait with resolving prior batches until current one commits#18181

Merged
Rich-Harris merged 7 commits into
differentiate-stale-reactionsfrom
differentiate-stale-reactions-2
May 7, 2026
Merged

fix: wait with resolving prior batches until current one commits#18181
Rich-Harris merged 7 commits into
differentiate-stale-reactionsfrom
differentiate-stale-reactions-2

Conversation

@dummdidumm

@dummdidumm dummdidumm commented May 6, 2026

Copy link
Copy Markdown
Member

builds on top of #18180

Tweaks the timing when we resolve earlier/outdated batches. Instead of doing that right away we only do it once the current batch is committed. That way

  • the old batch will not render right away in case this was the last pending value, while the current batch is still pending, causing tearing (because we partly render values of the current batch in the old batch already)
  • the old batch still has a chance to resolve itself in the meantime if the current batch is still pending in other areas

Tweaks the timing when we resolve earlier/outdated batches. Instead of doing that right away we only do it once the current batch is committed. That way
- the old batch will not render right away in case this was the last pending value, while the current batch is still pending, causing tearing (because we partly render values of the current batch in the old batch already)
- the old batch still has a chance to resolve itself in the meantime if the current batch is still pending in other areas
@changeset-bot

changeset-bot Bot commented May 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2baf4d0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Playground

pnpm add https://pkg.pr.new/svelte@18181

Comment thread packages/svelte/src/internal/client/reactivity/deriveds.js
@Rich-Harris Rich-Harris merged commit 4f66366 into differentiate-stale-reactions May 7, 2026
26 of 27 checks passed
@Rich-Harris Rich-Harris deleted the differentiate-stale-reactions-2 branch May 7, 2026 02:35
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.

2 participants