couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <>
Subject Re: add_lib in reducers?
Date Thu, 04 Apr 2013 06:21:03 GMT
Hi Samuel!

There is issue with patch about it:

And there is the explanation why so:

> One other issue: currently I haven't yet implemented commonjs for
> reduce functions. The reason I have not is that reduce functions are
> not batched, so library code would have to be sent and eval'd every
> single time the reduce function is run. On top of this, 99% of the
> time the reduce function won't make use of the library code, so it
> will just be dead weight. (I have a hard time thinking of when a
> reduce function will need to require library code).

Hope they make things clear (:


On Thu, Apr 4, 2013 at 5:44 AM, Samuel Williams
<> wrote:
> Hi,
> I've implemented a Ruby query server.
> I wanted to have libraries available to reduce functions.
> Is it okay to have add_lib add libraries to both mapper context and reduce
> context?
> The method of loading libraries seems a bit cumbersome in the current
> implementation, reducers are treated quite differently from mappers. Is
> there any plan to improve this going forward?
> Kind regards,
> Samuel

View raw message