incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajkumar S <rajkum...@gmail.com>
Subject Re: Slow Map Reduce
Date Thu, 22 Oct 2009 06:45:47 GMT
On Wed, Oct 21, 2009 at 9:48 PM, Paul Joseph Davis
<paul.joseph.davis@gmail.com> wrote:
> I suspect "return values;" is the culprit here. That's pretty much guranteed
> to cause you problems as the data grows recursing up the tree. 0.10.0 even
> detects this and throws an error to avoid precisely this issue.
>
> It's been discussed a couple times on the list but my stomach is rumbling.

That reduce function used in that log was the following.

function(keys, values, rereduce)
{
    length = 0;
    if (rereduce){
        for(var v = 0; v < values.length; v++){
            length = length + v.length;
        }
    } else {
        length = values.length;
    }
    return length;
}

The reduce function should returns a single integer and not cause data
to grow. Let me try with simpler map with no reduce and will report
the results.

with regards,
raj

Mime
View raw message