fix "Maximum call stack size exceeded" on resolveChildren
s results.push.apply(results, result)
#2543
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Related to #2542
What happens is that the
children
helper crashes when trying toresults.push.apply(results, [149k items])
, as it overflows the max amount of arguments a function can have.Line
solid/packages/solid/src/reactive/signal.ts
Line 1749 in 0af2c2b
Now, if we want to fix this, I'm honestly not sure, considerations:
length
is negligible, (as in no performance impact)Think point 1 gets me. If a component that can return data ends somehow being resolved by the children helper, then I suppose we should fix this.
Question: should also apply the edit to ? 🤔
solid/packages/solid/bench/libraries/s-mod.cjs
Line 293 in 0af2c2b
How did you test this change?
Test passes, I also tested it by hacking the solution in vites output.