couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Anderson" <jch...@grabb.it>
Subject Re: view index build time
Date Thu, 03 Jul 2008 00:03:49 GMT
On Wed, Jul 2, 2008 at 4:19 PM, Paul Davis <paul.joseph.davis@gmail.com> wrote:
> Also, where do the javascript conversions happen? Wouldn't that be in
> the beam process with mochiweb?

Yes - the javascript views communicate with the CouchDB mothership
over the JSON line protocol, so with each emit() Javascript objects
are converted to JSON strings in Spidermonkey, which is then parsed
from JSON in Erlang. Likewise, when CouchDB sends a doc to the view
server, it must convert it to a JSON string. The view server uses
eval() to parse that JSON into objects, which one hopes is decently
fast.

I wonder how the time in beam breaks down between JSON and sorting...
I wish I had time to learn Erlang profiling techniques.

-- 
Chris Anderson
http://jchris.mfdz.com

Mime
View raw message