You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "natcohen (via GitHub)" <gi...@apache.org> on 2023/05/22 15:07:13 UTC

[GitHub] [couchdb] natcohen opened a new issue, #4612: Cache VDU functions so they are not called for each document

natcohen opened a new issue, #4612:
URL: https://github.com/apache/couchdb/issues/4612

   [NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ )
   
   ## Summary
   
   When adding 100 documents, CouchDB sends the VDU functions for each and every document (meaning that the VDU functions are sent 100 times). This leads to poor performances.
   
   [NOTE]: # ( Provide a brief overview of what the new feature is all about. )
   
   ## Desired Behaviour
   
   [NOTE]: # ( Tell us how the new feature should work. Be specific. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   A better implementation would be to cache the VDU functions so they are not sent as often to the JS engine
   
   ## Possible Solution
   
   [NOTE]: # ( Not required. Suggest how to implement the addition or change. )
   Caching the functions or at least calling them only once per DB call.
   
   ## Additional context
   
   [TIP]:  # ( Why does this feature matter to you? What unique circumstances do you have? )
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] rnewson commented on issue #4612: Cache VDU functions so they are not called for each document

Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on issue #4612:
URL: https://github.com/apache/couchdb/issues/4612#issuecomment-1557399252

   note that the function strings are cached (by load_validation_funs in couch_doc), but we send them to couchjs on every doc update, so we don't get any benefit from JIT and we're bloating the message we send to validate_doc_update over stdio.
   
   see if we can do better here.
   
   related PR https://github.com/apache/couchdb/pull/1898 which proposes another way to do VDU's without javascript at all.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org