Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node-v0.x-archive
base: 089ec5861357
Choose a base ref
...
head repository: nodejs/node-v0.x-archive
compare: a63c28e6eb96
Choose a head ref
  • 2 commits
  • 20 files changed
  • 1 contributor

Commits on Feb 21, 2013

  1. stream: remove lowWaterMark feature

    It seems like a good idea on the face of it, but lowWaterMarks are
    actually not useful, and in practice should always be set to zero.
    
    It would be worthwhile for writers if we actually did some kind of
    writev() type of thing, but actually this just delays calling write()
    and the overhead of doing a bunch of Buffer copies is not worth the
    slight benefit of calling write() fewer times.
    isaacs committed Feb 21, 2013
    Copy the full SHA
    3b2e9d2 View commit details
    Browse the repository at this point in the history
  2. stream: Return false from push() more properly

    There are cases where a push() call would return true, even though
    the thing being pushed was in fact way way larger than the high
    water mark, simply because the 'needReadable' was already set, and
    would not get unset until nextTick.
    
    In some cases, this could lead to an infinite loop of pushing data
    into the buffer, never getting to the 'readable' event which would
    unset the needReadable flag.
    
    Fix by splitting up the emitReadable function, so that it always
    sets the flag on this tick, even if it defers until nextTick to
    actually emit the event.
    
    Also, if we're not ending or already in the process of reading, it
    now calls read(0) if we're below the high water mark.  Thus, the
    highWaterMark value is the intended amount to buffer up to, and it
    is smarter about hitting the target.
    isaacs committed Feb 21, 2013
    1
    Copy the full SHA
    a63c28e View commit details
    Browse the repository at this point in the history