You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Max Ogden <ma...@maxogden.com> on 2011/08/11 23:18:15 UTC
Bulk update performance with validation functions
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
Re: Bulk update performance with validation functions
Posted by Paul Davis <pa...@gmail.com>.
On Thu, Aug 11, 2011 at 4:18 PM, Max Ogden <ma...@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?