couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <>
Subject Re: Erlang vs JavaScript
Date Fri, 16 Aug 2013 09:32:55 GMT
On Fri, Aug 16, 2013 at 1:12 PM, Benoit Chesneau <> 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?


View raw message