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

Update maxRank to workaround limit on number of arguments of function #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sklinov
Copy link
Collaborator

@sklinov sklinov commented Jul 31, 2024

https://linear.app/datafold/issue/MON-3685/max-call-stack-on-large-lineage-graph#comment-20741a00

  • There's a limit for number of arguments in a JS function and that crashes Math.max()

@sklinov sklinov requested review from dagadbm and sandragg July 31, 2024 10:05
@sklinov sklinov self-assigned this Jul 31, 2024
@@ -205,15 +205,37 @@ function addBorderNode(g, prefix, rank, order) {
return addDummyNode(g, "border", node, prefix);
}

function splitToChunks(array, chunkSize = CHUNKING_THRESHOLD) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for readibility i would move these functions after maxRank

applyWithChunking first, followed by splitToChunks.

since we are not using const myFn = () => {} we can get away with this and makes it easier to read

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