Koffeegod / demo-issues

a set of dummy issues for shooting videos, demos, etc
0 stars 0 forks source link

PouchDB sends attachments even when they aren't needed during replication #11

Open Koffeegod opened 8 years ago

Koffeegod commented 8 years ago

When using _bulk_docs to send an update all attachments on a changed document will be included even though they haven't changed.

Similarly when downloading a changed document with a direct GET request PouchDB will include attachments=true and thus get a full copy of the attachments even though they have not changed.

This is massively increasing the cost of small document changes so we really have to fix it.

Koffeegod commented 8 years ago

So the trick on pull replication is for us to add support for atts_since to GET requests on individual documents. Once we have done that then we can decide if we want to figure out how to make _bulk_docs not require uploading unchanged attachments.

Add in support for revpos Add atts_since to GET - This specifically needs handling in the case that atts_since is used with open_rev and when it's not since those are two completely separate code paths in PouchDB. Add use of atts_since to pull replication Decide what we want to do about _bulk_docs (who also uploads attachments, even if they aren't changed, inline on all replication updates)