logoalt Hacker News

omcnoetoday at 12:57 AM1 replyview on HN

/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.


Replies

0x1d7today at 3:07 AM

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

NTFS itself is a fast file system.