[ 
https://issues.apache.org/jira/browse/COUCHDB-1075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029296#comment-13029296
 ] 

Alexander Shorin commented on COUCHDB-1075:
-------------------------------------------

Two questions:
1. Why new object created for cache proposes instead of storing compiled 
modules with replacing of original code? That could be required to create 
anonymous function before to not cache module, exports and require arguments, 
but anyway that could be more cheaper solution.
2. I see that all tests have finished with 200 OK status with no errors, but 
circular dependencies are signs of architecture flaws, aren't they? Wouldn't it 
better to explicitly alert developer to fix code before it haven't create 
require's hell?

No offence, I just interested in behavior synchronization(:

> Circular require's in CommonJS modules
> --------------------------------------
>
>                 Key: COUCHDB-1075
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1075
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>            Reporter: Caolan McMahon
>              Labels: javascript
>         Attachments: module_cache.diff
>
>
> Having a CommonJS module A which requires B, when B also requires A causes 
> the stack to fill up with require calls. A prerequisite for this fix is the 
> caching of modules, even if it is only on a per-request basis.
> Patch incoming.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to