-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Linking dependencies is taking a long time #1496
Comments
I'm having linking dependancies take 200+ seconds with this https://github.com/macdja38/pvpsite/blob/master/package.json on Windows 10, off an SSD with a decent i7. |
It seems the performance issue may be caused by windows Defender, disabling it while possibly inadvisable reduced 200s to somewhere closer to 50. |
I think that there should be a better solution than reducing security. |
Some other users have confirmed that disabling it just in the root directory of your project works, but I can't confirm as Windows Defender broke itself a bit when I tried to do that. |
Probably should be "solved" by this PR? |
Yeah there's not a lot we can do here unfortunately :( Virus scanners scan all files, and the npm ecosystem has a lot of small files. Small files generally have a bit more overhead on NTFS compared to other file systems such as EXT4 or ZFS, but it's exacerbated by virus scanners. Having said that, Yarn should still be faster than npm, it just won't be as fast as on Linux or Mac. |
I am on a Mac without having any antivirus scanners installed. But I still see the same problem, linking taking considerable amount of time even with a simple angular-js app. |
I have this issue too. It took 174s on Ubuntu. |
I started having this problem only after I upgraded from |
Strange thing as well is that I need to go throw linking process each time when I delete a package as well. Npm does that faster. And linking really takes long time. |
This can be reproduced with this package.json (on Heroku):
With yarn 0.17.8, the install takes 37s. With yarn 0.17.10, the install takes 97 seconds. No other changes (new Heroku apps each time). |
|
Please, can anyone explain what yarn does in "Linking dependencies" step exactly? |
Having this issue as well. Adding a dependency with node: 6.9.2 |
Same here. Links 23420...something, and takes about one and a half minutes on a good day. |
Yarn 0.19.1
EDIT: Turning off Windows Defender does reduce time to ~30 to ~50 seconds. I tried excluding the directory I'm working in, but that didn't seem to help. |
Just ran a fresh copy of create-react-app and it took 876.37s. I understand you don't have much/any control over how anti-virus works but my experience with NPM and CRA was much faster on Windows. |
On windows 10 just use Ubuntu bash shell as a general advice. |
Disk I/O is extremely slow in Windows Subsystem for Linux, it's a known limitation at the moment
@JeffBaumgardt - Interesting... Yarn is slower on Windows, but it should still be faster than npm! |
@Daniel15 it probably should be, but it's not. Node installs and de-installs were smaller for me. So I would do cc @echobnet For anyone on windows 10 + windows defender |
@SleeplessByte or you can simply add |
I can confirm that it is very slow on Mac 10.12.3, too. Not related to windows. And it seems my setup is way slower than others in this thread. yarn sometimes tries to link around 600.000 files in small projects. This can take more than 30 minutes. I currently try it with a clean cache and nightly (v0.22.0-20170226.1626). I use the official registry as well as a custom private registry for certain scoped packages. However my colleagues don't suffer from this problem, so I don't think the custom private registry is the problem (and fetching packages is already finished anyway). We also have some relative files with I have a lot of problems installing https://github.com/google/material-design-icons which has a lot of small files which seem to be troublesome for other people as well (google/material-design-icons#518). I don't know if my hardware is broken handling a lot of small files or something like that or if this is related at all. Again my colleagues don't have as much problems installing https://github.com/google/material-design-icons as I do. Update I'm not sure... it looks like installing a package with |
Ubuntu 16.04 :( |
Windows 10 v 1709 + SSD + PowerShell + Node 6.12.2: |
Any solution for Ubuntu platform? I literally have to think twice before adding a package. |
Ubuntu is super fast for me, no slowness at all.
…On Fri, 23 Feb 2018, 11:13 Basant Besra, ***@***.***> wrote:
Any solution for Ubuntu platform? I literally have to think twice before
adding a package.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1496 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAcMheTtAYOsXcrnej_f2F8bY5D3nDT2ks5tXizngaJpZM4Kh3OZ>
.
|
This is super annoying. I literally changed one line in a module, republished it under a new version and It'd be quicker just to manually update my packages using a text editor |
I also experience this issue:
My system is NodeJS: v9.9.0 |
Also super slow for me node v8.10.0 OSX 10.11.6 (15G19009) |
I have switched back to [email protected] are things are working pretty great. |
We are using the offline cache feature to avoid this problem most of the time, but as soon as the package.json or yarn-lockfile change, then we are back to this problem. Linking takes 10 minutes on our Linux machine. I do not think this is windows specific. |
This is definitely not a Windows only issue (which should be evident from all the posts from people on non-Windows machines)! I'm on macOS High Sierra 10.13.4, using node 10.1.0 (npm 5.6.0) and yarn 1.6.0. Using yarn, installing a dependency took ~40s. I switched to npm and it took about ~10 seconds. I'll stick to npm for the time being. |
Same for our centos 7 box. Any updates on this? |
it is happening to me on 1.9.2 on mac on node 10 |
For me on macOS HighSierra, Avast FileShield was causing the issue. I've added the yarn executable as excluded path, using |
Same here. Yarn 1.9.2, node 10.6.0 on High Sierra. |
@bestander this is not a Windows issue. I can repro on my Mac with Yarn 1.9.4. This issue should be reopened. |
@davidgoli , better open a new issue, this is a new one and should be triaged separately |
Yarn is quite slow for any environment I ran it. Debian, Mac, Windows. The new issue was open? or the RFC that get rid of node_modules will solve this? |
i have same issue, already switch to npm but still got bug |
I have also same issue with Yarn. Any solution found? |
This not a duplicate, this issue is not only about Windows. Opening a new issue would cause a loss of context. |
I have same issue!
MacOS / Docker |
Vagrant yarn MacBook Pro (Retina, 13-inch, Early 2015)
I actually can't run |
yarn v1.17.3 WindowsI have tried to put my App project folder location at the same disk section as The result: C and D are the same physical disk. MacHowever Mac is faster than Windows I think the bottleneck is the disk read/write speed? |
OS X 10.15 I am still experiencing this. Project is located in a mounted encrypted disk image. Installing a single package takes several minutes with a relatively small Edit: Turns out that changing yarn's default cache folder to be on the same encrypted volume fixed this for me. This was really the root of the issue. |
Just got hit by this too and I'm running: OS: Ubuntu 18.04.2 |
Just to Done in 530.63s. It can take up to 25 minutes for me to install dependencies for a small project. I've looked at every GitHub issue and found nothing to resolve the issue. Any ideas? |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
when installing a dependency, the third step:
linking dependencies
is taking a long time, even for a single packageIf the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Please mention your node.js, yarn and operating system version.
node: 6.7.0
OS: Windows 10
The text was updated successfully, but these errors were encountered: