couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <>
Subject Re: multiview using bloom filters
Date Sat, 25 Sep 2010 09:18:42 GMT
Hi, good work.

I haven't had the time to look at it in detail, only glanced at it.
My comments:

- use indentation of 4 spaces - I see some places using indentation of
2 spaces, others using more, etc;
- most of CouchDB's code uses a different style of case expression
indentation - each case branch as the same indentation as the case
line, e.g.:

case lists:member(foobar, List) of
true ->
false ->

This avoids the code to grow too much horizontally (and more readable
in my opinion, but this is very subjective).

- keep lines to 80 characters at most
- instead of using list_to_binary and binary_to_list, you can use the
?l2b and ?b2l macros defined in couch_db.hrl, they help reducing line


On Sat, Sep 25, 2010 at 12:54 AM, Norman Barker <> wrote:
> Hi,
> thanks to Paul's excellent suggestion I have rewritten the multiview
> to use bloom filters, I had a concern that a bloom filter per view
> would use too much memory but thanks in the main to excellent
> implementation of bloom filters in erlang
> ( they seem to be
> very space efficient.
> New code is here
> The code is simple, all one process, once we have agreed the approach
> we can decide if there is any benefit in making the bloom filter
> generation occur a separate process (using a genserver).
> Comments as always appreciated, I will continue adding to the test suite.
> thanks for the help,
> Norman

Filipe David Manana,,

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

View raw message