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

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

Closed
StarpTech opened this issue Feb 27, 2017 · 1 comment
Closed

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

StarpTech opened this issue Feb 27, 2017 · 1 comment
Labels
doc Issues and PRs related to the documentations. question Issues that look for answers. stream Issues and PRs related to the stream subsystem.

Comments

@StarpTech
Copy link

In the docs saying:

Note: In general, the readable.pipe() and 'data' event mechanisms are preferred over the use of the 'readable' event.

Reference: https://nodejs.org/dist/latest-v6.x/docs/api/stream.html#stream_readable_streams

What does 'general' means because of simplicity ? I think it should be better documented. Pull streams are much more efficient e.g referring to buffering and back-pressure.

https://gist.github.com/caike/ebccc95bd46f5fa1404d

@mscdex mscdex added doc Issues and PRs related to the documentations. question Issues that look for answers. stream Issues and PRs related to the stream subsystem. labels Feb 27, 2017
mcollina added a commit to mcollina/node that referenced this issue Jun 3, 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
@mcollina
Copy link
Member

mcollina commented Jun 5, 2017

Fixed in 5ca836c

@mcollina mcollina closed this as completed Jun 5, 2017
mcollina added a commit to mcollina/node that referenced this issue 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 <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
jasnell pushed a commit that referenced this issue 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 <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this issue 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 <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. question Issues that look for answers. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants