couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Wolff <awo...@gmail.com>
Subject Re: helper functions in reduce
Date Tue, 10 Mar 2009 17:18:15 GMT
thanks for the reply chris. that was just a typo with "helper1" should've
been:        for each val in vals
            if ( view.helper1(val) ) result = view.helper2(val, result);

I'll do some measurements when we get closer to production and report back
to the list.

A

On Mon, Mar 9, 2009 at 7:02 PM, Chris Anderson <jchris@apache.org> wrote:

> On Mon, Mar 9, 2009 at 5:31 PM, Adam Wolff <awolff@gmail.com> wrote:
> > Am I the only person who's worried about this?
> >
>
> I've definitely wondered about it. I'd be curious to see some measurements.
>
> This seems like the sort of thing the JS optimizer could clean up
> really easily. So far I haven't worried to much about view function
> computation time, as it seems to be roughly matched with index
> maintenance time. That is, I've never felt that JS view function
> execution was the bottleneck.
>
> The first thing I'd optimize in your example function is all the extra
> calls to helper1() but I'm guessing it's just an example.
>
> Chris
>
> --
> Chris Anderson
> http://jchris.mfdz.com
>

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