Commit 7dbb5b4
fix: derived reactivity and perf regressions (#17362)
* add test sample
* add test for sveltejs/kit#15059
* fix: reconnect deriveds inside branch effects
* add changeset
* fix: derived with no deps always set as MAYBE_DIRTY
fixes #17342
* add test for #17342
* additional changeset
* refactor: extract setting derived status to helper, apply to sources.js
* add test case for #17352
* fix: reconnect child deriveds when evaluating connected parent derived
fixes #17352
* fix import order causing Cannot read properties of undefined on dev load
* remove duplicate iteration over deps
* minor style tweaks
* oops, fix merge
* use update_derived_status, so that we never set a dep-less derived MAYBE_DIRTY
* tweak
* reaction.deps cannot be null for a MAYBE_DIRTY derived
* make it such that reactions without deps are never MAYBE_DIRTY
* since we no longer need to check reaction.deps === null, we can revert this bit
* more explicit check
* tidy up
* more
* gah whoops
* move import
* simplify test
* make dep-less derived behaviour more explicit, move it above is_destroying_effect handling
* remove test - this is adequately covered by #17445
* replace tricky unit test with component-based test
* remove incorrect test
* remove the BRANCH_EFFECT stuff
* tidy up
* DRY
* tweak, add explanatory comment
* tweak
* explanatory comment
* remove changeset
* update changeset
---------
Co-authored-by: Tee Ming <[email protected]>
Co-authored-by: Rich Harris <[email protected]>1 parent ae224be commit 7dbb5b4
File tree
4 files changed
+101
-7
lines changed- .changeset
- packages/svelte
- src/internal/client
- tests/runtime-runes/samples/derived-read-outside-reaction
4 files changed
+101
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
628 | 638 | | |
| 639 | + | |
| 640 | + | |
629 | 641 | | |
630 | 642 | | |
631 | | - | |
| 643 | + | |
632 | 644 | | |
633 | 645 | | |
634 | 646 | | |
| |||
652 | 664 | | |
653 | 665 | | |
654 | 666 | | |
655 | | - | |
| 667 | + | |
656 | 668 | | |
657 | 669 | | |
658 | 670 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments