Uh oh!
There was an error while loading. Please reload this page.
stream: simplify Writable.write - #31146
Conversation
Uh oh!
There was an error while loading. Please reload this page.
e5ca143 to
4741a70CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jan 1, 2020
lpinca
commented
Jan 1, 2020
@nodejs/streams |
|
ronag
commented
Jan 1, 2020
@BridgeAR: Applied your comment regarding typeof vs instanceof here as well |
mscdex
commented
Jan 2, 2020
Benchmark CI: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/499/console Seems like a lot of bad regressions... |
mscdex
left a comment
There was a problem hiding this comment.
Performance regressions should be resolved first
I'm a little confused what happened here. Passing I've slightly changed this to not include the streams/writable-manywrites.jscallback='no'writev='no'sync='no'n=2000000**2.84%±1.80%±2.38%±3.08%streams/writable-manywrites.jscallback='no'writev='no'sync='yes'n=2000000-1.17%±1.80%±2.39%±3.12%streams/writable-manywrites.jscallback='no'writev='yes'sync='no'n=2000000**2.03%±1.23%±1.62%±2.09%streams/writable-manywrites.jscallback='no'writev='yes'sync='yes'n=2000000-1.34%±2.10%±2.82%±3.71%streams/writable-manywrites.jscallback='yes'writev='no'sync='no'n=20000001.26%±1.47%±1.95%±2.51%streams/writable-manywrites.jscallback='yes'writev='no'sync='yes'n=2000000-0.73%±2.41%±3.21%±4.21%streams/writable-manywrites.jscallback='yes'writev='yes'sync='no'n=2000000**2.30%±1.39%±1.84%±2.39%streams/writable-manywrites.jscallback='yes'writev='yes'sync='yes'n=20000001.45%±2.27%±3.04%±4.01% |
4eb510d to
7e59633CompareBridgeAR
commented
Jan 2, 2020
@ronag I think it makes sense to keep the encoding part in the benchmark. That way it's easier to identify regressions. |
ronag
commented
Jan 2, 2020
But right now the encoding part doesn't do anything with |
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
commented
Jan 2, 2020
BridgeAR
commented
Jan 2, 2020
@mscdex the performance issue is resolved. PTAL. |
ronag
commented
Feb 9, 2020
rebased |
e19ef3a to
bf34c46Comparenodejs-github-bot
commented
Feb 9, 2020
nodejs-github-bot
commented
Feb 9, 2020
bf34c46 to
b3e3180Compareronag
commented
Feb 9, 2020
ronag
commented
Feb 14, 2020
@mcollina: Just a quick post rebase LGTM before landing? |
nodejs-github-bot
commented
Feb 14, 2020
ronag
commented
Feb 14, 2020
I believe this was resolved in a different commit related to http2. |
ronag
commented
Feb 14, 2020
Landed in 194f2e20db11 |
Slightly refactors Writable.write for minor perf and readability improvements. PR-URL: #31146 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
codebytere
commented
Feb 29, 2020
@ronag this'll need manual bp it looks like, but feel free to swap out the label with |
ronag
commented
Mar 10, 2020
@MylesBorins this will now land cleanly on 13.x-staging |
Slightly refactors Writable.write for minor perf and readability improvements. PR-URL: #31146 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Simplifies
Writable.writeand adds an optimization where if you pass'buffer'as theencodingparameter towrite(chunk, encoding, cb)it will bypass a slow path where we check whetherchunkis aBufferor not.#31146 (comment)
Details
```js streams/writable-manywrites.js sync='no' n=2000000 0.98 % ±2.18% ±2.88% ±3.72% streams/writable-manywrites.js sync='yes' n=2000000 *** 30.92 % ±4.45% ±5.93% ±7.76% ````Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes