Skip to content

Svelte 5 playground is freezing #11625

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

Closed
cdcarson opened this issue May 14, 2024 · 2 comments · Fixed by #11634
Closed

Svelte 5 playground is freezing #11625

cdcarson opened this issue May 14, 2024 · 2 comments · Fixed by #11634

Comments

@cdcarson
Copy link

Describe the bug

After a few recompiles due to editor changes, the page freezes for quite some time. On a "fresh" firefox (i.e. without any possible cache or storage issues)...

image

This happens in at least Chrome and Firefox. To me, looking at the logs, it seems like an issue with either (1) whatever editor you're using, where changes to code are not being debounced before compiling or (2) some web worker thing. But I'm not qualified to say.

Reproduction

I have no way of reproducing.

Logs

# from chrome

about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
index-ZdIW0gts.js:80 console.clear() was prevented due to 'Preserve log'
index-ZdIW0gts.js:80 running Svelte compiler version 5.0.0-next.133
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
index-ZdIW0gts.js:80 console.clear() was prevented due to 'Preserve log'
index-ZdIW0gts.js:80 running Svelte compiler version 5.0.0-next.133
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
lifecycle_double_unmount @ playground:output:489
unmount @ playground:output:2102
window.__unmount_previous @ playground:output:2289
eval @ VM52 playground:output:14
handle_message @ about:srcdoc:88
postMessage (async)
(anonymous) @ 3.CAWxXAAe.js:88
iframe_command @ 3.CAWxXAAe.js:88
eval @ 3.CAWxXAAe.js:88
x @ 3.CAWxXAAe.js:391
(anonymous) @ 3.CAWxXAAe.js:442
Nn @ runtime.lPXyeT_a.js:1
(anonymous) @ runtime.lPXyeT_a.js:1
In @ runtime.lPXyeT_a.js:1
F @ runtime.lPXyeT_a.js:1
gn @ runtime.lPXyeT_a.js:1
On @ runtime.lPXyeT_a.js:1
Jn @ runtime.lPXyeT_a.js:1
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
unmount @ playground:output:2104
window.__unmount_previous @ playground:output:2289
eval @ VM52 playground:output:14
handle_message @ about:srcdoc:88
postMessage (async)
(anonymous) @ 3.CAWxXAAe.js:88
iframe_command @ 3.CAWxXAAe.js:88
eval @ 3.CAWxXAAe.js:88
x @ 3.CAWxXAAe.js:391
(anonymous) @ 3.CAWxXAAe.js:442
Nn @ runtime.lPXyeT_a.js:1
(anonymous) @ runtime.lPXyeT_a.js:1
In @ runtime.lPXyeT_a.js:1
F @ runtime.lPXyeT_a.js:1
gn @ runtime.lPXyeT_a.js:1
On @ runtime.lPXyeT_a.js:1
Jn @ runtime.lPXyeT_a.js:1
about:srcdoc:70 [Violation] 'message' handler took 22764ms
index-ZdIW0gts.js:80 console.clear() was prevented due to 'Preserve log'
index-ZdIW0gts.js:80 running Svelte compiler version 5.0.0-next.133
about:srcdoc:163 [svelte] lifecycle_double_unmountTried to unmount a component that was not mounted
console.<computed> @ about:srcdoc:163
lifecycle_double_unmount @ playground:output:489
unmount @ playground:output:2102
window.__unmount_previous @ playground:output:2289
eval @ playground:output:14
handle_message @ about:srcdoc:88
postMessage (async)
(anonymous) @ 3.CAWxXAAe.js:88
iframe_command @ 3.CAWxXAAe.js:88
eval @ 3.CAWxXAAe.js:88
x @ 3.CAWxXAAe.js:391
(anonymous) @ 3.CAWxXAAe.js:442
Nn @ runtime.lPXyeT_a.js:1
(anonymous) @ runtime.lPXyeT_a.js:1
In @ runtime.lPXyeT_a.js:1
F @ runtime.lPXyeT_a.js:1
gn @ runtime.lPXyeT_a.js:1
On @ runtime.lPXyeT_a.js:1
Jn @ runtime.lPXyeT_a.js:1
about:srcdoc:272 stack trace
console.trace @ about:srcdoc:272
unmount @ playground:output:2104
window.__unmount_previous @ playground:output:2289
eval @ playground:output:14
handle_message @ about:srcdoc:88
postMessage (async)
(anonymous) @ 3.CAWxXAAe.js:88
iframe_command @ 3.CAWxXAAe.js:88
eval @ 3.CAWxXAAe.js:88
x @ 3.CAWxXAAe.js:391
(anonymous) @ 3.CAWxXAAe.js:442
Nn @ runtime.lPXyeT_a.js:1
(anonymous) @ runtime.lPXyeT_a.js:1
In @ runtime.lPXyeT_a.js:1
F @ runtime.lPXyeT_a.js:1
gn @ runtime.lPXyeT_a.js:1
On @ runtime.lPXyeT_a.js:1
Jn @ runtime.lPXyeT_a.js:1
about:srcdoc:70 [Violation] 'message' handler took 45722ms

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 74.31 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.0 - ~/.nvm/versions/node/v20.12.0/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.0/bin/npm
    pnpm: 9.1.0 - ~/Library/pnpm/pnpm
    bun: 1.0.29 - ~/.bun/bin/bun
  Browsers:
    Chrome: 124.0.6367.202
    Edge: 124.0.2478.105
    Safari: 17.4.1

Severity

annoyance

@matubu
Copy link
Contributor

matubu commented May 15, 2024

Same issue for me

@dummdidumm
Copy link
Member

It may be #11610 because that's the first PR that observes this behavior, but I'm not sure why yet. My hunch is repeated patching of the prototype causes a massively slow includes/indexof etc

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 a pull request may close this issue.

3 participants