Skip to content

Conversation

@mcollina
Copy link
Member

We stated that 'data' and pipe() are preferred over 'readable'.
This commit clarifies that 'data' and pipe() are easier to understand,
but 'readable' might result in increased throughput.

Fixes: #11587

Checklist
Affected core subsystem(s)

doc, stream

We stated that 'data' and pipe() are preferred over 'readable'. This commit clarifies that 'data' and pipe() are easier to understand, but 'readable' might result in increased throughput. Fixes: nodejs#11587
@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem. labels Jun 3, 2017
@mcollina
Copy link
MemberAuthor

cc @nodejs/streams


*Note*: In general, the `readable.pipe()` and `'data'` event mechanisms are
preferred over the use of the `'readable'` event.
easier to understand compared to the `'readable'` event.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Micro-nit: compared to -> than

Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with or without my suggested nit

@mcollina
Copy link
MemberAuthor

Landed as 5ca836c.

@mcollinamcollina closed this Jun 5, 2017
mcollina added a commit to mcollina/node that referenced this pull request Jun 5, 2017
We stated that 'data' and pipe() are preferred over 'readable'. This commit clarifies that 'data' and pipe() are easier to understand, but 'readable' might result in increased throughput. Fixes: nodejs#11587 PR-URL: nodejs#13432 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
jasnell pushed a commit that referenced this pull request Jun 5, 2017
We stated that 'data' and pipe() are preferred over 'readable'. This commit clarifies that 'data' and pipe() are easier to understand, but 'readable' might result in increased throughput. Fixes: #11587 PR-URL: #13432 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@jasnelljasnell mentioned this pull request Jun 5, 2017
@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
MylesBorins pushed a commit that referenced this pull request Jul 17, 2017
We stated that 'data' and pipe() are preferred over 'readable'. This commit clarifies that 'data' and pipe() are easier to understand, but 'readable' might result in increased throughput. Fixes: #11587 PR-URL: #13432 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
@MylesBorins
Copy link
Contributor

I've landed this in v6.x... please let me know if it should be backed out

@mcollina
Copy link
MemberAuthor

@MylesBorins this is ok to be backported.

@mcollinamcollina deleted the fix-11587 branch July 17, 2017 17:47
@MylesBorinsMylesBorins mentioned this pull request Jul 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.streamIssues and PRs related to the stream subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs say that 'data' event mechanisms is preferred over 'readable'

7 participants

@mcollina@MylesBorins@Trott@addaleax@lpinca@tniessen@nodejs-github-bot