Various tests require an event per doc updated and I have taken their 
requirements as given and definitive of the API requirements thus far. 
But I have no problems with the event being once per batch and changing 
the tests if that is preferred.

Does this need further consideration? Or should I just do it? It's an 
easy change.

On 24/04/2014 8:00 a.m., Calvin Metcalf wrote:
>
> In lib/replicate.js:
>
> >        }
> >        result.last_seq = last_seq = currentBatch.seq;
> > -      utils.call(opts.onChange, null, result);
> > +      currentBatch.docs.forEach(function () {
> > +        result.docs_written++;
> > +        returnValue.emit('change', utils.clone(result));
>
> we only need this once per batch, as it is it gives you a flood of 
> events all at once when you just care about the last one, so maybe just
>
> result.docs_written  +=  currentBatch.docs.length;
> returnValue.emit('change',  utils.clone(result));
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/pouchdb/pouchdb/pull/1963/files#r11920575>.
>