GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — src: refactor stream callbacks and ownership by addaleax · Pull Request #18334 · nodejs/node Conversation
Member
Instead of setting individual callbacks on streams and tracking Benchmark results show no significant changes:As a heads up, after this I’d like to also refactor the writable side a bit more by removing Checklist
Affected core subsystem(s)src
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
jasnell
approved these changes
jasnell
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extreme nit: s/Node's/Node.js'
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
force-pushed
the
stream-listener
branch
from
bc23a25 to
2ecac89
Compare
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
force-pushed
the
stream-listener
branch
2 times, most recently
from
bbd7913 to
39fb222
Compare
apapirovski
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM 👍
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
mcollina
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM, this is very solid work.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
addaleax
force-pushed
the
stream-listener
branch
from
39fb222 to
2bcc28d
Compare
Instead of setting individual callbacks on streams and tracking
stream ownership through a boolean `consume_` flag, always have
one specific listener object in charge of a stream, and call
methods on that object rather than generic C-style callbacks.
Benchmark results show no significant changes:
$ ./node benchmark/compare.js --runs 5 --new ./node --old ./node-master net | Rscript benchmark/compare.R
[00:43:05|% 100| 8/8 files | 10/10 runs | 6/6 configs]: Done
improvement confidence p.value
net/net-c2s-cork.js dur=5 type="buf" len=1024 -0.80 % 0.720985414
net/net-c2s-cork.js dur=5 type="buf" len=128 -3.50 % 0.278786279
net/net-c2s-cork.js dur=5 type="buf" len=16 -4.44 % * 0.010458284
net/net-c2s-cork.js dur=5 type="buf" len=32 -0.51 % 0.445313528
net/net-c2s-cork.js dur=5 type="buf" len=4 -1.57 % 0.074816557
net/net-c2s-cork.js dur=5 type="buf" len=512 -0.25 % 0.926451422
net/net-c2s-cork.js dur=5 type="buf" len=64 1.66 % * 0.020469582
net/net-c2s-cork.js dur=5 type="buf" len=8 -0.18 % 0.739524856
net/net-c2s.js dur=5 type="asc" len=102400 -0.22 % 0.904819514
net/net-c2s.js dur=5 type="asc" len=16777216 0.34 % 0.862222556
net/net-c2s.js dur=5 type="buf" len=102400 -0.45 % 0.755593966
net/net-c2s.js dur=5 type="buf" len=16777216 1.87 % 0.477896886
net/net-c2s.js dur=5 type="utf" len=102400 -0.30 % 0.572739665
net/net-c2s.js dur=5 type="utf" len=16777216 1.18 % 0.369268245
net/net-pipe.js dur=5 type="asc" len=102400 1.18 % 0.368102481
net/net-pipe.js dur=5 type="asc" len=16777216 0.41 % 0.659646192
net/net-pipe.js dur=5 type="buf" len=102400 1.65 % 0.148484290
net/net-pipe.js dur=5 type="buf" len=16777216 0.05 % 0.949649889
net/net-pipe.js dur=5 type="utf" len=102400 0.65 % 0.463140117
net/net-pipe.js dur=5 type="utf" len=16777216 0.57 % 0.531757174
net/net-s2c.js dur=5 type="asc" len=102400 0.01 % 0.994663657
net/net-s2c.js dur=5 type="asc" len=16777216 0.55 % 0.690648594
net/net-s2c.js dur=5 type="buf" len=102400 1.06 % 0.162661878
net/net-s2c.js dur=5 type="buf" len=16777216 2.21 % 0.458328732
net/net-s2c.js dur=5 type="utf" len=102400 0.47 % 0.346382821
net/net-s2c.js dur=5 type="utf" len=16777216 -1.19 % 0.075676276
net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=102400 -5.01 % 0.566507367
net/net-wrap-js-stream-passthrough.js dur=5 type="asc" len=16777216 1.81 % 0.382296906
net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=102400 -4.32 % 0.543143575
net/net-wrap-js-stream-passthrough.js dur=5 type="buf" len=16777216 0.12 % 0.774690856
net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=102400 2.33 % 0.152586683
net/net-wrap-js-stream-passthrough.js dur=5 type="utf" len=16777216 0.50 % 0.687525683
net/tcp-raw-c2s.js dur=5 type="asc" len=102400 0.05 % 0.917082371
net/tcp-raw-c2s.js dur=5 type="asc" len=16777216 4.17 % ** 0.005564067
net/tcp-raw-c2s.js dur=5 type="buf" len=102400 0.56 % * 0.037673166
net/tcp-raw-c2s.js dur=5 type="buf" len=16777216 0.77 % ** 0.006890503
net/tcp-raw-c2s.js dur=5 type="utf" len=102400 -0.50 % 0.397862701
net/tcp-raw-c2s.js dur=5 type="utf" len=16777216 1.00 % 0.300638263
net/tcp-raw-pipe.js dur=5 type="asc" len=102400 0.82 % 0.722353484
net/tcp-raw-pipe.js dur=5 type="asc" len=16777216 15.00 % 0.070918075
net/tcp-raw-pipe.js dur=5 type="buf" len=102400 -1.03 % 0.819639125
net/tcp-raw-pipe.js dur=5 type="buf" len=16777216 18.35 % 0.329069149
net/tcp-raw-pipe.js dur=5 type="utf" len=102400 -0.27 % 0.984576346
net/tcp-raw-pipe.js dur=5 type="utf" len=16777216 2.78 % 0.362840470
net/tcp-raw-s2c.js dur=5 type="asc" len=102400 -0.15 % 0.820491736
net/tcp-raw-s2c.js dur=5 type="asc" len=16777216 -0.42 % 0.813160796
net/tcp-raw-s2c.js dur=5 type="buf" len=102400 0.26 % 0.615102013
net/tcp-raw-s2c.js dur=5 type="buf" len=16777216 -2.16 % 0.464289164
net/tcp-raw-s2c.js dur=5 type="utf" len=102400 -0.33 % 0.383964275
net/tcp-raw-s2c.js dur=5 type="utf" len=16777216 1.08 % 0.224603980
PR-URL: nodejs#18334
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Anatoli Papirovski <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
force-pushed
the
stream-listener
branch
from
2bcc28d to
69f3831
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
BridgeAR
pushed a commit
to BridgeAR/node
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
3 tasks done
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
addaleax
added a commit
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: #18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Closed
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
Instead of setting individual callbacks on streams and tracking stream ownership through a boolean `consume_` flag, always have one specific listener object in charge of a stream, and call methods on that object rather than generic C-style callbacks. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
MayaLekova
pushed a commit
to MayaLekova/node
that referenced
this pull request
Instead of passing along the handle object, just set it as a property on the stream handle object and let the read handler grab it from there. PR-URL: nodejs#18334 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |