incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: 0.9 to 0.10 breaking changes
Date Thu, 27 Aug 2009 19:13:20 GMT
On Thu, Aug 27, 2009 at 3:08 PM, Adam Wolff<awolff@gmail.com> 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

HTH,
Paul Davis

Mime
View raw message