On Wed, Jul 2, 2008 at 4:19 PM, Paul Davis <[EMAIL PROTECTED]> 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
