D
D
Dmitry2020-06-21 16:54:55
Windows
Dmitry, 2020-06-21 16:54:55

Why did yarn become slow under WSL 2?

I upgraded WSL to version 2 two weeks ago and yarn (serve | build) worked pretty fast in the beginning. Literally a couple of seconds to launch. A week has passed and after another reboot, yarn began to work terribly slowly. I didn’t do anything suspicious, I didn’t install anything, I didn’t configure anything.

"yarn serve" server now takes 40 to 80 seconds to start!
And, worse, stopped tracking file changes!
5eef629d970ec000265982.png
Yarn got a deep depression :(

Tried:

  • reinstall Ubuntu 14.04
  • uninstalled 14.04, installed Ubuntu 18.04
  • run WSL from different consoles
  • Googling but didn't find any similar issues.


What to do? Where to look?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bill876, 2020-06-22
@svetozar

This is a known situation . Disk performance dropped a lot in WSL2 when accessing files on the host filesystem, as From the point of view of WSL2, the host file system is a network one.
Detailed answer here .
TLDR: don't go to /mnt when you need performance, put the project's source code inside the WSL filesystem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question