Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle duplicate signal dependencies gracefully #12261

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Jul 2, 2024

Follow up to #12245. Fixes #12230. This also permits duplicate dependencies and instead we avoid processing duplicates in remove_reactions. This means far less work is done on the fast normal path, and instead we just do a bit more work when removing signals.

This PR faster in almost all the benchmarks than main for me, and the ones it is not it's off by a small fraction which shows that the codepath likely isn't being hit.

Copy link

changeset-bot bot commented Jul 2, 2024

🦋 Changeset detected

Latest commit: fa2bab3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

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

visitor

another approach

tune

tune
@Rich-Harris
Copy link
Member

I do think we need to get a test in here — I was looking at this code the other day thinking we could possibly make it a bit more obvious what's going on, but we'll be prone to regressions if we make any changes to it

@trueadm
Copy link
Contributor Author

trueadm commented Jul 2, 2024

I do think we need to get a test in here

I'll try again.

@trueadm
Copy link
Contributor Author

trueadm commented Jul 2, 2024

@Rich-Harris Was able to reproduce the same issue with a test! :)

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.

[Svelte 5] {#if} block with several reactive children does not re-render properly
2 participants