| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
LGTM |
Sorry, something went wrong.
|
cc @nodejs/streams |
Sorry, something went wrong.
There was a problem hiding this comment.
Has this property already been set on the object? If not I would suggest placing it, even just this.corkedCbs = null; in the constructor. This will help prevent the object map from changing, and aide the optimizing compiler.
Sorry, something went wrong.
There was a problem hiding this comment.
It is done some line before: https://github.com/nodejs/node/pull/3751/files#diff-1915a7b992a3012b177dd855fa3477e0R116
Sorry, something went wrong.
|
👍 from me |
Sorry, something went wrong.
|
👍 LGTM |
Sorry, something went wrong.
There was a problem hiding this comment.
Can this only ever be two corkedCbs long? If we already have corkedCbs, and it has .next assigned, will we replace it with a new set of callbacks?
Sorry, something went wrong.
There was a problem hiding this comment.
Missing semi colon
Sorry, something went wrong.
There was a problem hiding this comment.
@chrisdickinson good spot! I planned to write more about this! My understanding is that it is only 2 corkedCbs long. Maybe I am wrong, see these lines, the callback can be deferred on the nextTick: https://github.com/mcollina/node/blob/perf-clearBuffer/lib/_stream_writable.js#L360-L364.
There might also be a different way to implement that, maybe having an array with two objects, and a even/odd counter.
Sorry, something went wrong.
|
I like the direction this is going! I might be misunderstanding this bit though — is this behavior intended? |
Sorry, something went wrong.
There was a problem hiding this comment.
Missing semi colon
Sorry, something went wrong.
|
I've renamed the field, changed the little class into CorkedCbs, and added the missing semicolons. @chrisdickinson are you happy with my explanation on the double element? Do you see another (possibly faster) way to implement this? |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
I think so, though I might suggest adding a comment (or an assert) stating that we only ever expect two of these per stream. Thanks for bearing with me! |
Sorry, something went wrong.
|
@chrisdickinson I have added an assert and a comment. It should be ok now. Let me know if it is ok and I'll squash my commits. |
Sorry, something went wrong.
Sorry, something went wrong.
|
CI Looks good. Couple of related failures. |
Sorry, something went wrong.
|
@jasnell anything I should look into/fix? It seems there are windows-specific and arm-specific failures. On a window configuration, test-child-process-fork-regr-gh-2847.js is failing. On ARM, I can't access https://ci.nodejs.org/job/node-test-commit-arm/1188/nodes=armv7-wheezy/tapTestReport/ (I get a Gateway Timeout) - so I can't really know. On ARM fanned (what does that mean?), I'm getting a timeout/failure on test-crypto-dh.js. |
Sorry, something went wrong.
|
There's nothing you need to do. The issues are with the CI environment
|
Sorry, something went wrong.
|
LGTM — I don't have access to the CI server at the moment, perhaps @jasnell can restart CI? |
Sorry, something went wrong.
Sorry, something went wrong.
Do you mean technically or you're on your phone or something that makes it impractical? If you technically can't access it then we should sort that out! |
Sorry, something went wrong.
|
@rvagg: ah! I take it back. Last I checked I was in a weird state where I could kind of log in using the old pw auth, but it seems to have resolved. False alarm! |
Sorry, something went wrong.
This commits removes a function allocation inside the clearBuffer function. Moreover, it adds counting of buffered chunks to instantiate a fixed-sized Array. The performance improvements are in the range 5-50%, depending on the usecase.
|
I've run this on the CI, and I'm getting a possibly unrelated failure on node-test-binary-windows: https://ci.nodejs.org/job/node-test-binary-windows/301/. (I've rebased this to master, and squashed the commits) @chrisdickinson @jasnell if you folks are good with this, I would like to get this merged at some point this week. |
Sorry, something went wrong.
|
Those are known flakey tests, so LGTM. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This commits removes a function allocation inside the clearBuffer function. Moreover, it adds counting of buffered chunks to instantiate a fixed-sized Array. The performance improvements are in the range
5-50%, depending on the usecase.
Here is gist of the results of the http benchmarks in node on my MacBook Pro Late 2014 (i7, 16GB of RAM): https://gist.github.com/mcollina/5c59c057cb5b138fcd70.
cc @trevnorris @lucamaraschi @nodejs/benchmarking