4 ms·
Most compilation processes create a lot of very small files. Or a metric ton of them if you're unlucky enough to do js. NTFS is awful at doing lots of small ac
by ohgodplsno 4y ago
Most compilation processes create a lot of very small files. Or a metric ton of them if you're unlucky enough to do js.
NTFS is awful at doing lots of small accesses on very small files, at least compared to Ext4. Add to that the fact that if you're on WSL, it needs to write POSIX attributes (which NTFS has no support for and therefore WSL must emulate), and that's a recipe for builds being slowed massively by IO.
As for Defender, well, Defender sees new files and halts everything while it scans them. You can see how that can be a problem for a process that pops out tens of thousands of temporary files, which it will all go and scan, locking them while it does so.
- jart 4y agoAnother thing that makes Windows builds go slow is the lack of vfork(). On Linux, vfork() lets you create and teardown a new process in ~30 microseconds. On Windows it takes about 6000 microseconds to do the same thing, which is in large part due to the lack of copy-on-write memory (which Windows won't support, due to Microsoft corporate culture being heavily biased against overcommit models).
- csdvrx 4y ago> which NTFS has no support for and therefore WSL must emulate With ntfs3 (kernel 6) this is no longer true, as can be seen for example in Arch install living next to windows on C:\ https://gist.github.com/motorailgun/cc2c573f253d0893f429a165b5f851ee https://gist.github.com/motorailgun/cc2c573f253d0893f429a165... Also NTFS has had POSIX attributes support - they just weren't used before.
- ohgodplsno 4y agoNote that I said WSL, not WSL2.
- csdvrx 4y agoAnd I insist: NTFS has support for POSIX attributes. NTFS3 proves that: you can install arch on C:\, and use it normally. WSL1 doesn't support POSIX attributes, just like ntfs-3g didn't support them, but it's not a limitation of NTFS.