OK,  but you don't need to worry about the read only puts in this one. We
can do that in a separate pull
On Apr 23, 2014 6:13 PM, "ig3" <notifications@github.com> 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));
>
> It's trivial to emit one change event per batch: that's the way it was
> until I increased batch_size, at which point I added the noted loop to
> satisfy the tests. I'll remove the loop: one change event per batch, and
> change the affected tests.
> … <#14590a6da16a15a9_>
> On 24/04/2014 9:42 a.m., Dale Harvey 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)); However I am completely
> fine with doing the batch work in a follow up, not adding extra work to
> this patch is a good thing — Reply to this email directly or view it on
> GitHub <https://github.com/pouchdb/pouchdb/pull/1963/files#r11925446>.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pouchdb/pouchdb/pull/1963/files#r11926626>
> .
>