incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Why are reads from CouchDB so slow? (1.5MB/s or thereabouts)
Date Fri, 23 Mar 2012 16:43:47 GMT

On Mar 23, 2012, at 6:35 AM, Volker Mische wrote:

> You are right. It won't be raw JSON, but it can be way closer to that
> (hence less processing needed for sending it out) than it currently is
> the case.

TouchDB* stores document contents as raw JSON without the special (underscored) properties
like _id, _rev, _attachments. When serving a document it re-inserts those properties based
on document metadata; but it splices them into the document body data before the closing ‘}’,
so it doesn’t have to parse the document JSON.

(There are cases where it has to parse the document, but not on a basic GET.)

—Jens

* https://github.com/couchbaselabs/TouchDB-iOS
Mime
View raw message