This repository was archived by the owner on Apr 22, 2023. It is now read-only.
add cache for module with same version#8617
Closed
hustxiaoc wants to merge 2 commits intonodejs:masterfrom
Closed
Conversation
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!
Member
|
What if you have two packages with the same name, but installed from different sources? Or for example you have one Sorry, but this optimisation can and is performed by npm, when it is installing packages. |
|
npm should resolve this issue. |
Author
|
npm seems doesn't work well~ |
|
npm will work well. |
Author
|
好吧 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In a large project developed with node.Js, some modules are used frequently, let's say
underscoreorlodash, module A depends on it,and module B depends on it too, they are depended on the same version. So moduleunderscoreis 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!