I’m trying to do some tests with OCaml on Windows, using a virtual machine, but the tooling performance is abysmal: a single opam update takes 6 minutes; dune build sometimes spends more than a minute seemingly doing nothing, and only then starts updating the count of remaining tasks; compilation is very slow, even if the VM has access to 8 cores, the host is idle, etc.
Apparently this might be related to disk accesses, but I’m not sure.
I have a relatively new computer (recent Thinkpad with AMD Ryzen 7 PRO, NVMe SSD, etc), and on the Linux host things are very snappy, but the Windows VM is really slow.
I’ll try to get a real Windows on another computer to speed things up, but even when I did it in the past, it still felt sluggish compared to Linux.
So, my question is: is this “normal”?
Is it unavoidable, maybe due to the “unixy-like” nature of OCaml on Windows (with Cygwin by default), which imposes lots of small file accesses, for which apparently Windows is not optimized?
Or is it mostly due to the VM, and for you people developing OCaml on a “real” Windows, there’s no performance penalty?
Might it be related to the compiler? If I switch to MSVC, will it greatly improve things?
By the way, I’m currently using Windows 11, but it also used to happen with Windows 10.
Note: I’m not considering WSL here, since my goal is to ensure that Windows users need to do as little as possible, and many cannot/do not want to use WSL.