• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

I Like Kill Nerds

The blog of Australian Front End / Aurelia Javascript Developer & brewing aficionado Dwayne Charrington // Aurelia.io Core Team member.

  • Home
  • Aurelia 2
  • Aurelia 1
  • About
  • Aurelia 2 Consulting/Freelance Work

Yarn Slow In Windows? Disable Windows Defender

Front End Development · February 3, 2017

I switched to Yarn a while ago, because Npm is incredibly limited. And while I enjoy fast speed on macOs and Linux, Windows has always been a bit slow.

I never actually thought to investigate the issue until one frustrated evening, I had the task manager open and noticed Windows Defender was going crazy when I was doing a yarn install on a pulled down SPA app.

Turns out disabling Windows Defender halved the amount of time it took to not only resolve dependencies but link them from the local cache.

Disabling Windows Defender is half the battle, though. As disabling it via the Windows Defender settings panel only does so temporarily.

The real fix is to actually a couple of Node.js folders to the Windows Defender exclusions list. You can do this via the settings panel.

The Node.js folder is located at: c:\Program Files\nodejs and lastly the npm global folder is at: c:\Users\YourUserName\AppData\Roaming\npm

Ignore both of these folders and you will see Yarn speed up dramatically.

I guess the downside of the Node ecosystem being comprised of tens of thousands of files spells doom when antivirus and malware scanning software gets in the way.

Now I wonder, what else was Windows Defender slowing down?

Dwayne

Leave a Reply Cancel reply

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Balder
Balder
5 years ago

It works. How to exclude folders in Windows Defender for Windows 10:

https://support.microsoft.com/en-us/instantanswers/64495205-6ddb-4da1-8534-1aeaf64c0af8/add-an-exclusion-to-windows-defender

0
zewa666
zewa666
5 years ago

Great tip, I’d update the article with Balders comment, thx for that 😉

0
Balder
Balder
5 years ago

It looks like it’s not working anymore. Since my last Windows update Yarn is extremely slow. I have tried to disable Windows Defender completely and it’s still very slow.

0
Nico Wernli
Nico Wernli
4 years ago

You can also exclude processes from Windows Defender So excluding node.exe I guess will be fine

0
Gregg B. Jensen
Gregg B. Jensen
2 years ago

Thank you, I tried things from several different blogs, and this is the only one that worked. In our case it was a server in Azure with Windows Defender.

0
Nope
Nope
1 year ago

Nice, thank you!

0
Bubba Rodgers
Bubba Rodgers
1 year ago

Yeah right. Those working in a corporate environment can’t do a thing about it.

0

Primary Sidebar

Popular

  • Testing Event Listeners In Jest (Without Using A Library)
  • How To Get The Hash of A File In Node.js
  • Web 3.0 may have died before it even started
  • Smoke Detector Randomly Goes Off Early Hours of The Morning
  • NBN Box Installed Inside of Garage, Where Do You Put The Modem?
  • How to Copy Files Using the Copy Webpack Plugin (without copying the entire folder structure)
  • How To Install Eufy Security Cameras Without Drilling or Using Screws
  • How to Use Neural DSP Archetype Plugins With the Quad Cortex
  • How To Calculate A Javascript Date X Months Ago With Vanilla Javascript
  • Which Neural DSP Archetype Plugins Should You Buy?

Recent Comments

  • Casey Milne on A List of WordPress Gutenberg Core Blocks
  • Jay on Neural DSP Reveal Details About the Long-Awaited Quad Cortex Desktop Editor
  • john on Deno Raises $21M – but is anyone using it yet?
  • Oranges on How To Store Users In Firestore Using Firebase Authentication
  • Precious on Fixing Sequel Pro SQL Encoding Error For Imported SQL Files

Copyright © 2022 · Dwayne Charrington · Log in

wpDiscuz