couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: Erlag View performance
Date Tue, 09 Mar 2010 20:05:55 GMT
If there's discussion to be had here, it should maybe go over to dev@,
so I'm crossposting there.

I looked at the code (only briefly), but you can take a look too...

src/couchdb/couch_native_process.erl

It looks like the functions are (as per the view server api) parsed
only once and then just applied to the documents.
Now, the foldrows function is not just a call to lists:foldl, so maybe
there's a little extra overhead here.
Also, there might be more i/o contention when the results are being
written to the view index rather than just output in your eclipse
console (or maybe I don't understand your benchmark exactly).

If you are writing erlang views you must know some erlang, so maybe
take a look and see if you can't optimize the view server a bit.

Cheers!

-Randall

On Tue, Mar 9, 2010 at 08:46, Michael McCaffrey <mmccaffrey@ittvis.com> wrote:
> Reposting, to try and get some traction on this. Baffled as to why the
> view takes 10-20 times longer per record in couch than running in pure
> erlang environment.
>
> When each record takes almost a second, things run forever...
>
> Any help appreciated.
>
>
>
> Hello,
>
> I'm using an erlang view to fold thru large deep lists and have a
> performance issue.
>
> Being a relative erlang newbie I thought it was a codingsue, however...
>
> When I run thru a document locally (in Eclipse) I can fold thru the doc
> in 47000 micro seconds.
>
> When I fold thru the same document during the view, it takes almost a
> full second (900000 micro seconds). All the documents take about this
> long.
>
> Any thoughts on why this may be happening?
>
> Thanks
>
>
>
>

Mime
View raw message