Skip to content
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

RangeError: Maximum call stack size exceeded on javascript concat method on large arrays #4319

Closed
Spazierenman opened this issue Mar 13, 2019 · 1 comment

Comments

@Spazierenman
Copy link

Description

I ran into such a problem when parsing a large piece of JSON using jquery.tmpl.js. This error appears when handling large arrays with the concat() function. Here is a link to the problem: https://bugs.chromium.org/p/chromium/issues/detail?id=103583 The problem has not been solved since 2011. To solve it, accept please my pull request.
We check if there is a flat() function in the browser's arsenal, for example, it has a chrome browser, and if there is - simply merge the data arrays - nothing more is needed. If not, the browser will go a slower path, but at least there will be no error.

Link to test case

@mgol
Copy link
Member

mgol commented Mar 14, 2019

Please don't open multiple issues for the same problem. You've already reported it in #4318 (remember to fill the issue template, though, including providing the test case) and there's more discussion in #4320.

@mgol mgol closed this as completed Mar 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants