-
Notifications
You must be signed in to change notification settings - Fork 541
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
perf: reduce amount of used Uin8Arrays in client-h1.js #3514
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a rough memory that we tried this before but we had to revert it, because there were multiple http responses being written into the same buffer in parallel, and data got corrupted.
@ronag wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember if this could cause problems. LGTM with the change i proposed.
Co-authored-by: Robert Nagy <ronagy@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm. yes. very strange. If I check the detached flag, it isnt set to true. |
instead of instantiating an Uint8Array on every llhttp execution, we keep a view on the ArrayBuffer and reuse it.