-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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] Max call stack exceeded when large number of components are flushed #7397
[fix] Max call stack exceeded when large number of components are flushed #7397
Conversation
…while a previous flush is running
@dummdidumm But it would also mean it's working again, while all versions since that commit break our app. |
The while loop will actually keep going as note: tests also pass with this fix, but I'll see about adding additional tests Edit: I also tested this branch with the code from https://svelte.dev/repl/5c59fe6aa6354b03aea62c445836f2b1?version=3.44.3 which was used as a reproduction (#6760) for one of the fixes that #6920 addressed, and the fix still works, no regression. |
@dummdidumm mind having a 2nd look at this? Happy to pivot as needed to get a resolution. Thank you! |
@bluwy @Conduitry Hi guys, please tell me what needs to be done to merge this PR? Because the problem remains relevant for us and we are still on svelte version 3.44.2. |
@dummdidumm See post above please |
Please provide a reproducible (REPL or github repo) so we can investigate this properly. This PR isn't doing anything, |
ok, got it. I'll try to do a REPL |
Hey guys, apologies I’ll take a look at updating the PR again. |
@dummdidumm @Conduitry https://svelte.dev/repl/86b8b83f2e2b475e8e92aaa4df9c7da2?version=3.44.2 - everything is good Looks like the problem appeared after the merge of this PR: https://github.com/sveltejs/svelte/pull/6920/files I hope this helps you find the problem and fix it. |
Close in favor of #8114 |
This PR is in reference to the discussion here: #7032
Without this check,
flush()
is being invoked multiple times, even if the previous run has not yet completed. This occurs if/when you have a large number of components. Eventually, this repeated invocation results in a max call stack exceeded error.(I shall add a test for the original issue ASAP, get a test/pass based on the change)
Before submitting the PR, please make sure you do the following
[feat]
,[fix]
,[chore]
, or[docs]
.Tests
npm test
and lint the project withnpm run lint