Closed
Description
Describe the bug
Destructuring $derived
with N values results in code size that is quadratic in N. The expected outcome is that it would be linear by destructuring only the value that is actually used.
For example, destructuring 26 values results in code that destructures 26 values being repeated 26 times, resulting in 676 destructurings. See the JS output in the REPL example below.
This issue doesn't occur when destructuring $props
.
Reproduction
System Info
Svelte REPL with version 5.33.1
Severity
annoyance
Metadata
Metadata
Assignees
Labels
No labels