@raynos are you sure this is the case? the test is showing that the push is
flushed quickly. perhaps objectMode results in a watermark of 0 or
something.

On Sunday, March 23, 2014, Raynos (Jake Verbaten) <notifications@github.com>
wrote:

> In lib/levelup.js:
>
> > @@ -80,9 +81,23 @@ function LevelUP (location, options, callback) {
> >    prr(this, 'location', location, 'e')
> >
> >    this.open(callback)
> > +  var self = this
> > +  self.on('put', function (key, value) {
>
> This is a terrible idea. Every levelup instance is going to buffer the
> every write to the database in memory.
>
> .push() just stores the stuff in memory, You need to handle back pressure
>
> var writeMore = self.push({ id: key, value: value })if (!writeMore) {
>   stopLeakingMemory()}
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/rvagg/node-levelup/pull/234/files#r10869817>
> .
>