On Thu, Aug 27, 2009 at 12:13 PM, Paul Davis<[email protected]> wrote:
> On Thu, Aug 27, 2009 at 3:08 PM, Adam Wolff<[email protected]> wrote:
>> How is reduce size computed? Is it strictly number of bytes?
>> Thanks,
>> A
>
> The basic algorithm is:
>
> lenght1 = JSON.stringify(input).length;
> length2 = JSON.stringify(output).length
> if(enforce_reduce_limit && length2 > 200 && (length2 * 2) > length1)
>    throw(reduce_overflow_error);
>
> Check line 49-55 or so in ./share/server/view.js
>

There are a million ways this could be made more subtle. Also, as
mentioned on another thread, it'd be nice to have the 200 byte
threshold configurable, instead of just a boolean case.

Chris


-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Reply via email to