You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Currently packages are all installed to ~/.atom/packages, but since there is no package.json file or node_modules folder in ~/.atom/packages, none of the packages ever share a common module when the dependency versions match.
So if you have 10 packages that depend on ^1 of underscore-plus, 10 copies of the same underscore-plus version will be required. This dramatically affects startup time since each version can take up to 10-15ms to require.
One solution is to add a seeded cache of common package modules in ~/.atom/packages/node_modules that would be populated and maintained by apm such that apm install would also dedupe modules across packages.
Then we can just document the common modules and tell people to add something like this to their package.json file (and possibly include in apm init) if they want to use them:
This offers a nice middle-ground where we don't have to export these common modules and worry about bumping the Atom major version when one changes its major version, we can just recommend what versions packages authors bind to and control and maintain a well-tuned cache of them so that depending on them doesn't slow down your package.
Would the package cache use the same modules as core? Is that possible? So core uses pathwatcher and package X uses pathwatcher. Will it only require once?
We could specify the versions of this cache in the core package.json:
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!
Activity
benogle commentedon Sep 30, 2014
Would the package cache use the same modules as core? Is that possible? So core uses
pathwatcherand package X usespathwatcher. Will it only require once?We could specify the versions of this cache in the core
package.json:lock commentedon Jan 25, 2019
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!