couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: Erlang vs JavaScript
Date Fri, 16 Aug 2013 19:23:58 GMT
On Fri, Aug 16, 2013 at 4:49 PM, Volker Mische <>wrote:

> On 08/16/2013 11:32 AM, Alexander Shorin wrote:
> > 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?

I would like to hear a goal for this effort? What is the definition of
success and failure?

Jan makes a fine point on user@. I "live with the pain." But really, life
is pain. Deny it if you must. Until we are delivered--finally!--our sweet
release, we will necessarily endure pain.


* When you store a record, a machine must write that to storage
* If you have an index, a machine must update the index to storage

Building an index requires visiting every document. One way or another, the
entire .couch file is coming off the disk and going through the ringer. One
way or another, every row in the view will be written. I am not clear why
optimizing from N ms/doc to 1/2 N ms/doc will help, when you still have to
read 30GB from storage, and write 30GB back.

One one end the computer scientist says we cannot avoid the necessary time
complexity. On the other end, the casual user says, if it is not
instantaneous, then it hardly matters.

That is, we have a problem of expectation management, not codec speed.
Nobody expects MySQL's CREATE INDEX to finish in a flash, and nobody should
expect that of a view.

If somebody does set out to accelerate views, you're welcome. But I would
ask: what is a successful optimization, and why?

(Also, Noah, if you are out there, this is an example of the sort of thing
I would put on the wiki but past bad experiences make me say "can't be

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message