You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stream docs, writable.cork() and writable.uncork() methods #7340
Working on #7287 I notice that writable.cork() and writable.uncork() are not together, I guess it's because the alphabetical order, but I think the experience reading the stream documentation is going to be better if they live together.
changed the title [-]stream docs form, writable.cork() and writable.uncork() methods[/-][+]stream docs, writable.cork() and writable.uncork() methods[/+]on Jun 19, 2016
There are many other cases in the documentation where an exception would be warranted. The problem is that if you keep making exceptions, then the documentation loses all consistency.
On a side note - it seems these methods are moot for socket connections to non local servers? Using cork / uncork to buffer writes to a local connection practically doubles the op/s. But to a remote server it halves it...? 😭
Is there any different logic for non-local connections? See redis/ioredis#343 that PR I did, I switched to not using cork as it's more performant (~70k ops/s more), but even with a cork/uncork implementation the result on remote servers is the same - worse.
If there is some different logic then is it worth documenting this?
Activity
[-]stream docs form, writable.cork() and writable.uncork() methods[/-][+]stream docs, writable.cork() and writable.uncork() methods[/+]cjihrig commentedon Jun 20, 2016
You're right, but I think the overall doc experience is better if everything is predictably in alphabetical order.
italoacasas commentedon Jun 20, 2016
Yes, alphabetical order I think is the right choose, but on my opinion we can improve the experience if we make an exception on this case.
cjihrig commentedon Jun 20, 2016
There are many other cases in the documentation where an exception would be warranted. The problem is that if you keep making exceptions, then the documentation loses all consistency.
jasnell commentedon Jun 20, 2016
I'm -1 on changing the order. Improving the documentation so that the links between the two are clearer is definitely a good idea.
addaleax commentedon Jun 21, 2016
How about adding
See also:links in the places where it would otherwise make sense to reorder, e.g. one fromcork()touncork()and vice versa?cjihrig commentedon Jun 21, 2016
Makes sense to me.
Salakar commentedon Jul 4, 2016
On a side note - it seems these methods are moot for socket connections to non local servers? Using cork / uncork to buffer writes to a local connection practically doubles the op/s. But to a remote server it halves it...? 😭
Is there any different logic for non-local connections? See redis/ioredis#343 that PR I did, I switched to not using cork as it's more performant (~70k ops/s more), but even with a cork/uncork implementation the result on remote servers is the same - worse.
If there is some different logic then is it worth documenting this?
mcollina commentedon Feb 9, 2017
Fixed in c38b6d2
doc: add links between cork() and uncork()
doc: add links between cork() and uncork()
doc: add links between cork() and uncork()
doc: add links between cork() and uncork()
doc: add links between cork() and uncork()
doc: add links between cork() and uncork()