Yarn 5x slower on windows Yarn 5x slower on windows windows windows

Yarn 5x slower on windows


Disabling windows search indexing on your work folder and yarn cache folder as well as disabling windows defender completely or on a folder should give you significant performance boost. I've got 30-50% decrease on similar system with SSD drive, originally timings were as yours.

Disabling it on Yarn cache folder would also give you some speedup. Its location is shown by yarn cache dir command, %USERPROFILE%\Local Settings\Yarn\cache by default.

To disable search indexing on a folder, find it in Explorer, right click, then Properties - General - Advanced, uncheck the "Allow files in this folder to have contents indexed in addition to file properties" checkbox, then Apply the changes.

This performance issue already exists on yarn github (Oct'2016) and is still open to the moment: https://github.com/yarnpkg/yarn/issues/990


My experience...

Doing a yarn start is excruciatingly slow.

My setup.I am running WSL2 Ubuntu 20 on windows 10 home.I have my WSL src directory a sym link to windows c:\Users\chai (as opposed to whatever filesystem WSL has me in ie. the native WSL filesystem).ie.

Filesystem      Size  Used Avail Use% Mounted onC:\             476G  395G   82G  83% /mnt/c

I am running the yarn which is installed via WSL2 Ubuntu (ie. so it is the linux version, not the windows version of yarn).V v slow.

I experimented and copied the same src files into a non-symlinked directory.ie. under ~/tmp which is a WSL filesystem and not under the windows filesystem.

Filesystem      Size  Used Avail Use% Mounted on/dev/sdb        251G   11G  228G   5% /

And the speed now is as per expected... ie. normal (or relative to previous behaviour, blindingly fast).

So I am now using the latter setup for my react projects.


I used to have the same issue. It used to take 30+ Minutes to just install one package. I had my projects on an external drive and network drive and I tried adding scan virus exception path, opening firewall etc. None enhanced the speed. However, as soon as I git clone to, let say C:/New Folder/my repo. It took 1.5 seconds. I hope this resolves the issue for some developers.