Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: Short-circuit buffer pushes when flowing
When a stream is flowing, and not in the middle of a sync read, and the read buffer currently has a length of 0, we can just emit a 'data' event rather than push it onto the array, emit 'readable', and then automatically call read(). As it happens, this is quite a frequent occurrence! Making this change brings the HTTP benchmarks back into a good place after the removal of the .ondata/.onend socket kludge methods.
- Loading branch information