Skip to content

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

Closed
calvinmetcalf wants to merge 1 commit into
nodejs:masterfrom
calvinmetcalf:stream-opt
Closed

stream: avoid unnecessary concat of a single buffer.#3300
calvinmetcalf wants to merge 1 commit into
nodejs:masterfrom
calvinmetcalf:stream-opt

Conversation

@calvinmetcalf

Copy link
Copy Markdown
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.
@calvinmetcalfcalvinmetcalf 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
Copy Markdown
ContributorAuthor

now featuring a correctly spelled 'unnecessary'

@mafintosh

Copy link
Copy Markdown
Member

Nice catch! +1 in this change

@jamestalmage

Copy link
Copy Markdown

👍

@mscdexmscdex added the stream Issues and PRs related to the stream subsystem. label Oct 9, 2015
@chrisdickinson

Copy link
Copy Markdown
Contributor

LGTM!

@ronkorving

Copy link
Copy Markdown
Contributor

👍

@jasnell

Copy link
Copy Markdown
Member

@jasnell

Copy link
Copy Markdown
Member

LGTM so long as CI is green

@jasnell

Copy link
Copy Markdown
Member

CI pass looks good. Two unrelated failures.

@calvinmetcalf

Copy link
Copy Markdown
ContributorAuthor

🎉

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 <chris@neversaw.us>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #3300
@jasnell

Copy link
Copy Markdown
Member

Landed in 8854183

@jasnelljasnell closed this Oct 14, 2015
@rvaggrvagg 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 <chris@neversaw.us>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 <chris@neversaw.us>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #3300
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@calvinmetcalf@mafintosh@jamestalmage@chrisdickinson@ronkorving@jasnell@mscdex