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

stream: avoid unnecessary concat of a single buffer. #3300

Closed
wants to merge 1 commit into from

Conversation

calvinmetcalf
Copy link
Contributor

Avoids doing a buffer.concat on the internal buffer when that array has only a single thing in it. As pointed out in nodejs/readable-stream#162 this causes an unnecessary copy.

Avoids doing a buffer.concat on the internal buffer
when that array has only a single thing in it.
@calvinmetcalf calvinmetcalf changed the title stream: avoid unnecisary concat of a single buffer. stream: avoid unnecessary concat of a single buffer. Oct 9, 2015
@calvinmetcalf
Copy link
Contributor Author

now featuring a correctly spelled 'unnecessary'

@mafintosh
Copy link
Member

Nice catch! +1 in this change

@jamestalmage
Copy link

👍

@mscdex mscdex added the stream Issues and PRs related to the stream subsystem. label Oct 9, 2015
@chrisdickinson
Copy link
Contributor

LGTM!

@ronkorving
Copy link
Contributor

👍

@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

LGTM so long as CI is green

@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

CI pass looks good. Two unrelated failures.

@calvinmetcalf
Copy link
Contributor Author

🎉

jasnell pushed a commit that referenced this pull request Oct 14, 2015
Avoids doing a buffer.concat on the internal buffer
when that array has only a single thing in it.

Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #3300
@jasnell
Copy link
Member

jasnell commented Oct 14, 2015

Landed in 8854183

@jasnell jasnell closed this Oct 14, 2015
@rvagg rvagg mentioned this pull request Oct 21, 2015
jasnell pushed a commit that referenced this pull request Oct 26, 2015
Avoids doing a buffer.concat on the internal buffer
when that array has only a single thing in it.

Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #3300
jasnell pushed a commit that referenced this pull request Oct 29, 2015
Avoids doing a buffer.concat on the internal buffer
when that array has only a single thing in it.

Reviewed-By: Chris Dickinson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: #3300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants