Conversation
ea33898 to
3412764
Compare
3412764 to
49102ae
Compare
|
@nodejs/streams |
mcollina
left a comment
There was a problem hiding this comment.
Good work! I agree that this is going to make things faster (however we will need benchmarks), but this is likely going to break users in many ways.
We can see this in the tests, where a bunch of nextTick had to be added. Do you think it would be possible to make this backward compatible?
|
@mcollina: I'm unsure how bad of a breaking change this actually is. The test "wrongly" assume that That being said. The only "fully" backwards compatible way I can think of is to do this as a hack for |
|
Then I think we should not implement this. We might decide to bring https://www.npmjs.com/package/syncthrough into core, as it solves the same problem in a non-breaking way. |
|
@mcollina: Fair enough... feel free to close |
Minor fix and performance improvement. Synchronous writes do not require drain.
This can be a significant improvement especially for transform streams that do not perform any async work.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesNOTE TO SELF: Sync transform streams should have a no buffer option (i.e. hwm === 0).