Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Convert self.body to a Buffer if it's a String to reduce mem usage #2051
A performance regression was introduced in: 478e0c2#diff-ccc0734f65dd7a299409ff07d35be095L436 Strings have a larger overhead than Buffers, which can cause the process to run out of memory faster when POSTing large payloads.
This might be an edge case, but it's something I ran into in Artillery which uses Request for HTTP, and it is a regression in performance after
Test case here:
I can create an isolated test case for the test suite if this ok to be merged.
This PR has been closed as "abandoned" as a part of an automated cleanup. If this is a mistake and you are still interested in merging this PR, please do the following:
Thank you for your understanding. If you have any questions, please check out #2556 and feel free to comment / ask anything there.