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: Bulk update performance with validation functions
Date Fri, 12 Aug 2011 04:48:49 GMT
On Thu, Aug 11, 2011 at 4:18 PM, Max Ogden <max@maxogden.com> wrote:
>  I'm wondering if anyone has a solution for the huge bulk_docs performance
> hit incurred when using javascript validate_doc_update functions ~100k docs
> (2.6MB of json)    log_level info without validation: 0m2.663s
>  log_level info and validation: 0m30.778s (yes, it went from 2 seconds to 30
> seconds when I added a validation function)    validation function:
> ddoc.validate_doc_update
> = function (newDoc, oldDoc, userCtx) { if (newDoc._deleted === true &&
> userCtx.roles.indexOf('_admin') === -1) { throw "Only admin can delete
> documents on this database."; } }; is it possible to write these functions
> in erlang? max
>

Its been awhile since I peeped the erlang code for this, but maybe?

Also, you tried this on trunk with the new JSON parser improvements?

Mime
View raw message