On Fri, Aug 16, 2013 at 1:12 PM, Benoit Chesneau <bchesn...@gmail.com> wrote: > I agree, (modulo the fact that I would replace a string by a binary ;) but > that would be only possible if we extract the metadata (_id, _rev) from the > JSON so couchdb wouldn't have to decode the JSON to get them. Streaming > json would also allows that but since there is no guaranty in the > properties order of a JSON it would be less efficient.
What if we split document metadata from document itself? E.g. pass _id, _rev and other system or meta fields with separate object. Their size much lesser than whole document, so it will be possible to fast decode this metadata and decide is doc need to be processed or not without need to decode/encode megabytes of document's json. Sure, this adds additional communication roundtrip, but in case if it will be faster than json decode/encode - why not? -- ,,,^..^,,,