Linking dependencies is taking a long time
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 package
If 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
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.
I've got the same with issue with git repo with about 30 dependencies. Windows 10 node v5.5.0 yarn 0.16.1


Disabling Windows Defender reduced linking time significantly

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 0.17.8 to 0.17.19. Mac without antivirus.
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):
{
"name": "yarn-link-slowness",
"version": "0.1.0",
"private": true,
"dependencies": {
"axios": "^0.15.3",
"lodash": "^4.17.2",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react-player": "^0.12.1",
"react-redux": "^4.4.6",
"react-router": "^3.0.0",
"react-router-redux": "^4.0.7",
"react-scripts": "^0.8.4",
"redux": "^3.6.0",
"redux-auth-wrapper": "^0.9.0",
"redux-logger": "^2.7.4",
"redux-promise-middleware": "^4.2.0",
"redux-thunk": "^2.1.0"
},
"engines": {
"node": "7.2.1",
"yarn": "0.17.8"
}
}
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).
✨ Done in 45.10s.
"autoprefixer": "6.3.6",
"babel-core": "6.7.6",
"babel-jest": "13.0.0",
"babel-loader": "6.2.4",
"babel-plugin-transform-class-properties": "6.9.1",
"babel-plugin-transform-object-rest-spread": "6.8.0",
"babel-preset-es2015": "6.6.0",
"babel-preset-react": "6.5.0",
"bluebird": "3.3.5",
"cardmask": "github:aj0strow/cardmask#v1.0.0",
"chai": "3.5.0",
"classnames": "2.2.5",
"copy-webpack-plugin": "2.1.3",
"core-js": "2.4.1",
"css-loader": "0.23.1",
"enzyme": "2.3.0",
"file-loader": "0.8.5",
"force-case-sensitivity-webpack-plugin": "0.1.1",
"jest": "13.0.0",
"jest-cli": "13.0.0",
"json-loader": "0.5.4",
"lodash": "4.11.1",
"moment": "2.13.0",
"ms": "0.7.1",
"node-sass": "3.4.2",
"postcss-loader": "0.9.1",
"raw-loader": "0.5.1",
"react": "15.2.0",
"react-addons-css-transition-group": "15.2.0",
"react-addons-test-utils": "15.2.0",
"react-css-transition-replace": "2.0.1",
"react-dom": "15.0.1",
"react-redux": "4.4.5",
"react-router": "2.3.0",
"react-textarea-autosize": "4.0.3",
"recompose": "0.20.2",
"redux": "3.5.1",
"redux-actions": "0.10.0",
"redux-thunk": "2.0.1",
"reselect": "2.5.3",
"sass-loader": "3.2.0",
"sinon": "1.17.4",
"style-loader": "0.13.1",
"webpack": "1.13.0",
"webpack-dev-server": "1.14.1",
"whatwg-fetch": "1.0.0",
"zxcvbn": "4.3.0"
Please, can anyone explain what yarn does in "Linking dependencies" step exactly? Because max number on this step vary from ~1000 to ~65000 for same project on different machines. What does this number mean?
Having this issue as well. Adding a dependency with yarn add seems to trigger "Linking dependencies" and it takes forever. Had to switch back to npm for now.
node: 6.9.2 OS: Windows 10
node: 7.3.0 OS:Windows 10 64 Same for me

Same here. Links 23420...something, and takes about one and a half minutes on a good day.
Yarn 0.19.1 NodeJS 7.3.0 Windows 10
yarn add moment takes 105 seconds. It has no dependencies. :/
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.