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

Use Buffer for huge XML support #386

Closed
wants to merge 1 commit into from

Conversation

AlexC-ux
Copy link

I needed to generate an xml file with a total length greater than v8 allows (38 GB, and v8 only allows you to put 8 in a string), and these changes helped me not catch the “Range Error: Invalid string length” error.

All tests passed with the exception of 4 tests on error handlers, but this was unrelated to my changes.

If possible, I would like the library to support huge files.

@AlexC-ux
Copy link
Author

@jjhbw @guigrpa please check this code when you find the time)

jjhbw pushed a commit that referenced this pull request Sep 25, 2024
@jjhbw
Copy link
Collaborator

jjhbw commented Sep 25, 2024

This looks like a solid optimization, thanks! 👍

I merged this offline in e1032d9.

I took out a few additional memory allocations in d94eb73.

The fact that we're using Buffer again also makes it necessary to restore the browser polyfill for Buffer (277cb58).

@jjhbw jjhbw closed this Sep 25, 2024
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