couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kowsik <>
Subject Re: helper functions in reduce
Date Tue, 10 Mar 2009 03:44:45 GMT
Some other thing to consider. If you look at main.js there's a lot of
toJSON in there, which for a lot of documents takes up a lot of time
(I'm mostly extrapolating on this by looking at the code and the
overall behavior). This might be an ideal candidate to move into
couchjs.c, especially with the native JSON support that FF3 now has.
>From what I've read, eval is pretty fast (and is used for each line
read from couchdb to the view server).


On Mon, Mar 9, 2009 at 7:02 PM, Chris Anderson <> wrote:
> On Mon, Mar 9, 2009 at 5:31 PM, Adam Wolff <> 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

View raw message