Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 2241 invoked from network); 23 Feb 2011 09:40:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2011 09:40:06 -0000 Received: (qmail 1629 invoked by uid 500); 23 Feb 2011 09:40:06 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 1232 invoked by uid 500); 23 Feb 2011 09:40:03 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 1132 invoked by uid 99); 23 Feb 2011 09:40:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 09:40:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Feb 2011 09:39:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CD01A1B33E3 for ; Wed, 23 Feb 2011 09:39:38 +0000 (UTC) Date: Wed, 23 Feb 2011 09:39:38 +0000 (UTC) From: "Caolan McMahon (JIRA)" To: dev@couchdb.apache.org Message-ID: <1646921511.10382.1298453978836.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (COUCHDB-890) Add caching to CommonJS modules MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12998265#comment-12998265 ] Caolan McMahon commented on COUCHDB-890: ---------------------------------------- Having a module cache that can persist state between requests might not be a good idea since it could be unreliable with multiple js processes or break the caching rules. How would you know if a resource has changed if it also depends on the state of commonjs modules? See: https://issues.apache.org/jira/browse/COUCHDB-1075 for a patch that implements a module cache which is cleared between requests. You don't get the same performance benefits, but you do get increased compatibility with modules which store some state on the module (such as template libraries), and it also fixes circular requires. > Add caching to CommonJS modules > ------------------------------- > > Key: COUCHDB-890 > URL: https://issues.apache.org/jira/browse/COUCHDB-890 > Project: CouchDB > Issue Type: Improvement > Components: JavaScript View Server > Environment: All > Reporter: mikeal > Attachments: commonjscache.diff > > > We need some caching in the commonjs modules so that when you require('jsdom') it doesn't eval it every time you do a GET request to a show function. > Patch coming. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira