couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <>
Subject Re: Refactoring a CouchDB.
Date Thu, 17 Jan 2013 13:24:21 GMT
Hi Tim!

Glad to see that CouchDB goes into medicine (:

On Thu, Jan 17, 2013 at 4:08 PM, Tim Hankins <> wrote:
> The problem is that this filter function takes too long. ( >10minutes)
>     1). To test whether the filter function is crashing, I replicated the
> entire DB to another un-loaded machine, and it seems to run just fine.
> (Well it takes about 2.5 minutes, but it doesn't crash.)
>     2). I've tried re-writing the filter function in ERLANG, but haven't
> managed to get it working.

1) Integration tests were never fast. We're using regular unittests
for every design function running them directly within query server,
not through communication with it as with foreign process. All tests
are stored within design document, so you could run them on every
instance in every time to prove that things are supposed to work. This
saves a lot of time and helps to manage individual databases.

2) Erlang filters are extremely fast since they by passes a lot of
intermediate operations such as data encoding/decoding to/from json,
stdio communication and more. If you wanted to improve replication
speed it a good solution. But you should be aware about lack of
sandbox feature for them and be careful with running untrusted code.


View raw message