4 ms·
I guess the main issue is, that Windows filesystem APIs are slow. Windows does a lot of things when opening/closing file handles (acls, virus scanning, and many
by andix 11mo ago
I guess the main issue is, that Windows filesystem APIs are slow. Windows does a lot of things when opening/closing file handles (acls, virus scanning, and many more). Unix style applications with a lot of small files just perform really poorly. That's also why npm install takes ages on Windows.
They made it much better with Dev Drives, that use ReFS instead of NTFS and disables most of the filters in the filesystem stack.
- Gabrys1 11mo agoThe file operations on macOS are rather slow too. I needed to invest in some rsync-based syncing for an in-docker application build as accessing the mounted volume from a Docker container was around 20 times slower than on Linux :O
- andix 11mo agoThat’s another issue. The access from macOS/windows to the Linux filesystem (docker volume) is over the loopback network. Also the other way around docker bind mounts to windows/macos filesystem.
- perching_aix 11mo agoEvery FS I've ever had the misfortune of using chokes on lots of small files, especially if they're stored in a flat manner.
- andix 11mo agoEverything except FAT/NTFS is fine for small files. Refs works fine on windows too. Listing large directories is slow. But it is what it is.
- atonse 11mo agoI am advising a dev team that's used to using windows to use WSL for the new NextJS app we're building. But the filesystem performance really put a huge spoke in this. I thought everything was better with WSL2, but I was surprised to see that MS hasn't engineered some driver or something that would make this much more performant or pass-thru so that you can have a directory on windows but also have it perform really well in the VM.
- andix 11mo agoNo, don’t use WSL for JavaScript development. Dev Drive is what you’re looking for. But also pnpm has quite decent performance on NTFS, it uses symlinks
- p_ing 11mo agoSadly DevDrive doesn't perform that much better. ReFS write performance is slower than NTFS due to journaling. https://github.com/NullVoxPopuli/disk-perf-git-and-pnpm https://github.com/NullVoxPopuli/disk-perf-git-and-pnpm
- dboreham 11mo agoWSL2 is fine for JavaScript development. Just don't put the npm files on a Windows host filesystem. Put them in the Linux filesystem.
- andix 11mo agoOnly if you don't use windows tooling. If you use a native windows git client over the network file share, trouble begins. Even vscode without remote wsl core. You can put everything inside Linux, but then it's better to switch to Linux completely. Doesn't make sense to do everything inside the wsl vm. Node/js development works really well on native windows. Some things are a bit slower, but it's not horrible.
- the8472 11mo agoPut it inside the VM disk instead of the host filesystem and access that from the host instead when you need to exchange data.
- atonse 11mo agoYeah we ended up doing that, thanks. And it took a good 2 hours of fiddling to be able to access the files in windows.
- 11mo ago