Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

add cache for module with same version #8617

Closed
wants to merge 2 commits into from

Conversation

hustxiaoc
Copy link

In a large project developed with node.Js, some modules are used frequently, let's say underscore or lodash, module A depends on it,and module B depends on it too, they are depended on the same version. So module underscore is loaded twice , right? and that may cost more memory, so why don't we set the cache for the same module with the same version. Thanks!

In a large project  developed with node.Js, some modulex are used frequently, let's say ```underscore``` or ```lodash```,  module A is depended on it,and module B is  depended on it too, and they are depended on the same version. So module ```underscore``` is loaded twice , right?  and that may cost more memory, so why don't we set the cache for the same module with the same version. Thanks!
@indutny
Copy link
Member

indutny commented Oct 25, 2014

What if you have two packages with the same name, but installed from different sources? Or for example you have one npm linked package that you are live editing and the same package dependency in another module?

Sorry, but this optimisation can and is performed by npm, when it is installing packages.

@indutny indutny closed this Oct 25, 2014
@JacksonTian
Copy link

npm should resolve this issue.

@hustxiaoc
Copy link
Author

npm seems doesn't work well~

@JacksonTian
Copy link

npm will work well.

@hustxiaoc
Copy link
Author

好吧

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants