On 2025-02-02 at 21:45:34, M Hickford wrote: > On Sun, 2 Feb 2025 at 07:46, Johannes Sixt <j6t@xxxxxxxx> wrote: > > > > Am 01.02.25 um 23:56 schrieb M Hickford: > > > Hi. Has anyone else found that "meson test" is very slow on Windows? I > > > built Git using "meson compile" with compiler MSVC and backend ninja. > > > > The tests are very slow on Windows in general. Please clarify: when you > > say "very slow on Windows with meson", do you then mean "slower than > > with a Makefile build"? > > Thanks, I didn't know about that. This is my first time I've > successfully built Git on Windows, so I can't compare build systems. > (Makefile and CMake never worked for me.) > > Out of curiosity, why are the integration tests so much slower on > Windows than Linux? Is it the 10+ ms overhead of creating each new > process? https://stackoverflow.com/q/47845/284795 > https://stackoverflow.com/questions/10710912/what-is-the-process-creation-overhead-in-windows Our tests are primarily written in shell, which does a lot of fork and exec. These are native to and highly optimized on Unix, but Windows doesn't have this functionality natively for Win32 programs and the emulation is slow. Part of that is because the Cygwin-based libc actually has to emulate it nearly perfectly for software to work. While a partial emulation might work in _some_ cases, it would break in others, so a lot of care and expense has to be provided in making it work just so. Windows _does_ have this functionality in the kernel and it is reasonably performant, but it's only available in the Linux subsystem and not in the Win32 subsystem. The tests will probably be much faster if you use WSL, although that wouldn't allow you to build a Windows binary. Dscho and others put a lot of effort into porting shell programs into C to make them more performant on Windows (and elsewhere), since this has been a problem for a long time. -- brian m. carlson (they/them or he/him) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature