Commit ebb97a6
authored
perf: don't use tracing overeager during dev (#17183)
* perf: don't use tracing overeager during dev
#17176 is a case where many sources are created and then written to (due to Svelte 4 prop mechanics), and our tracing kicked in eagerly. That combined with the excessive depth of the related stack traces slowed things down tremendously.
The fix is simple: Don't record stack traces until we've seen this source get updated for a couple of times. Additionally we now delete the `updates` map after a flush. Previously it was just an ever-growing stack trace map.
* fix
* fix1 parent 3b4b0ad commit ebb97a6
File tree
6 files changed
+48
-13
lines changed- .changeset
- packages/svelte/src
- compiler/phases
- internal
- client
- dev
- reactivity
- flags
6 files changed
+48
-13
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 | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| 611 | + | |
| 612 | + | |
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| |||
633 | 635 | | |
634 | 636 | | |
635 | 637 | | |
636 | | - | |
637 | | - | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
638 | 642 | | |
639 | 643 | | |
640 | 644 | | |
| |||
643 | 647 | | |
644 | 648 | | |
645 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
646 | 656 | | |
647 | 657 | | |
648 | 658 | | |
649 | 659 | | |
650 | 660 | | |
651 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
652 | 668 | | |
653 | 669 | | |
654 | 670 | | |
| |||
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
203 | 211 | | |
204 | 212 | | |
205 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
| 3 | + | |
2 | 4 | | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
0 commit comments