Remix.run Logo
alberth 8 hours ago

Would you mind elaborating (for those of us uninformed)

omcnoe 7 hours ago | parent | next [-]

/mnt/c is a mounted C: drive in WSL2, that allows WSL2 guests to read/write files on the Windows host.

The mount is fine and speedy enough, but the underlying reads/writes turn into native NTFS reads/writes through Windows. NTFS file API is incredibly slow - high fixed overhead for initial file access.

So patterns like node_modules with many small individual files (or compiling code in general) are much much slower on Windows or WSL2 /mnt/c due to the fixed overhead adding up over a large number of files.

It's a ridiculous problem that has plagued Windows for years.

Fire-Dragon-DoL an hour ago | parent | next [-]

Could you expand? I never understood why this was considered acceptable, how is windows filesystem so slow compared to linux?

I am familiar with the issue, doing any sort of ruby development is a nightmare on windows because each require loads a file becoming increasingly slow at boot time

0x1d7 5 hours ago | parent | prev [-]

It's the file system filters that are an issue on Windows. It trades performance for extensibility.

NTFS itself is a fast file system.

weird-eye-issue 8 hours ago | parent | prev | next [-]

One example is that if you have a node modules folder on Windows and you try to delete it from WSL it can take 10 plus minutes whereas if you deleted it directly in Windows it would have just taken a few seconds

Also if you try running Next js from files on Windows from WSL it takes minutes for each page to compile to the point that any local development is impossible so you would have to either run the Next JS server on Windows or move the files to WSL

rahkiin 2 hours ago | parent [-]

Anything with node_modules takes ages on my Windows machine, whether it is through WSL, Docker or direct, largely in part due to corporate filters, checks, anti-virus and malware protectors and endpoint control.

yakz 8 hours ago | parent | prev | next [-]

It's difficult to overstate how horrible the performance is.

tonymet 8 hours ago | parent | prev [-]

WSL2 is a VM based on a Windows virtual disk file (VHD). inside that VHD IO is quite fast , a couple degrees worse than native. /mnt/c is how you access your windows files, but it's slow like NFS (socket based). anything needing high IOPS will be dog slow e.g. compiles, file scanning, etc.

the rule of thumb without the newest features is to copy work to/from /mnt/c into $HOME as needed.