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

Avoid unnecessary Buffer allocations in Node.js #3321

Conversation

puzpuzpuz
Copy link
Contributor

@puzpuzpuz puzpuzpuz commented Oct 7, 2020

Modifies http adapter to avoid some unnecessary Buffer allocations.

Buffer allocations are expensive as each buffer (note for Node.js 11.11.0 and newer: larger than 64 bytes) is baked with a chunk of off-heap memory (another note: there is also an internal "pool" to speed up Buffer.allocUnsafe and Buffer.concat, but its size is limited). Thus, they should be avoided where possible.

@jasonsaayman
Copy link
Member

@puzpuzpuz please can you look at fixing the merge conflicts?

@puzpuzpuz
Copy link
Contributor Author

@jasonsaayman done that.

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