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

Prevent Maximum call stack exceeded by apply args to Math.min, Math.max in chunks #447

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

sklinov
Copy link
Contributor

@sklinov sklinov commented Jul 31, 2024

Fixing the issue when Maximum call stack exceeded error is thrown on calculation of Math.min(...) and Math.max(...), due to limitations to the number of arguments that could be passed to the function.
(More context here: https://stackoverflow.com/questions/22747068/is-there-a-max-number-of-arguments-javascript-functions-can-accept).

Now, it's not recursive and limited to 65535 * 65535 = 4 294 836 225 arguments, but this can be improved in the future.

@rustedgrail rustedgrail merged commit 71a8f04 into dagrejs:master Aug 15, 2024
1 check passed
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 this pull request may close these issues.

2 participants