Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add subsequent single packages quicker by not linking with others? #1244

Open
laggingreflex opened this issue Oct 19, 2016 · 1 comment
Open

Comments

@laggingreflex
Copy link

laggingreflex commented Oct 19, 2016

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Doesn't exist

What is the expected behavior?

There should be a command that lets you add a single package without re-installing/checking/linking all existing packages.

So for example I have a project with a good amount of packages already installed. Now I want to add a new package. When I do yarn add <package-name> it goes through all the hoops of installing/linking/checking all the other dependencies that are already installed. Linking takes the most time. I trust it's to check and re-link inter-dependencies or to maintain overall integrity. But it's weird that it takes just as much time to add a single package, no matter how small or with howsoever little or no dependencies of its own it has.

npm@2 actually performs better in this scenario (in some conditions) by not having to bother maintaining compatibility or to go through de-duplication effort with parent's dependencies.

Adding subsequent packages without having their installation time inhibited by other installed packages would be awesome.

If the current behavior is a bug, please provide the steps to reproduce.

  1. In a big project install dependencies as usual
  2. then yarn add jquery (at mine it takes ~60s!! it's a small package with no deps, yet it takes 60s re-linking all previously installed ~1000 modules)
  3. install npm@2 somewhere and use it to install the same (installs in <10s)

Please mention your node.js, yarn and operating system version.

node v6.8.1
yarn v0.15.1

@laggingreflex
Copy link
Author

laggingreflex commented Feb 20, 2017

#1496 would also solve this tbh. I just thought this was normal - i.e. (re-)linking takes time. But then I saw how quick it is on linux machine (in the the above example it only takes <5-10s). It's actually how it should be on Windows too.

edit: #2176 fixes this as well.

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

No branches or pull requests

3 participants