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

fix: don't use spread operator when encoding vec #561

Merged
merged 3 commits into from Apr 20, 2022
Merged

fix: don't use spread operator when encoding vec #561

merged 3 commits into from Apr 20, 2022

Conversation

chenyan-dfinity
Copy link
Contributor

The spread operator (and Array.assign) loads the entire source array onto the stack, then pushes it onto the destination array. It causes stack overflow with large vector.

Copy link
Contributor

@krpeacock krpeacock left a comment

Choose a reason for hiding this comment

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

Sorry for the delay - I wanted to take a bit to review how the PipeArrayBuffer implementation worked

@krpeacock krpeacock enabled auto-merge (squash) April 20, 2022 19:14
@krpeacock krpeacock merged commit 4dae0c9 into main Apr 20, 2022
@krpeacock krpeacock deleted the fix-vec branch April 20, 2022 19:15
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.

None yet

2 participants