* "meson test" very slow on Windows @ 2025-02-01 22:56 M Hickford 2025-02-02 7:46 ` Johannes Sixt 0 siblings, 1 reply; 5+ messages in thread From: M Hickford @ 2025-02-01 22:56 UTC (permalink / raw) To: Git Mailing List; +Cc: Patrick Steinhardt, soekkle 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. Curiously the first few tests were fast. Test 20 (exact number varies) and later were slow: 1/1029 unit-tests OK 2.11s 2/1029 t-example-decorate OK 1.45s 3/1029 t-hash OK 1.32s 4/1029 t-hashmap OK 1.24s 5/1029 t-mem-pool OK 1.16s 6/1029 t-oid-array OK 1.10s 7/1029 t-oidmap OK 1.05s 8/1029 t-oidtree OK 0.98s 9/1029 t-prio-queue OK 0.94s 10/1029 t-reftable-basics OK 0.89s 11/1029 t-reftable-block OK 0.83s 12/1029 t-reftable-merged OK 0.77s 13/1029 t-reftable-pq OK 0.72s 14/1029 t-reftable-reader OK 0.64s 15/1029 t-reftable-readwrite OK 0.54s 16/1029 t-reftable-record OK 0.45s 17/1029 t-reftable-tree OK 0.29s 18/1029 t-strbuf OK 0.20s 19/1029 t-strcmp-offset OK 0.51s 20/1029 t-trailer OK 5.40s 21/1029 t-urlmatch-normalization OK 5.32s 22/1029 t-reftable-stack OK 17.67s 23/1029 t0013-sha1dc OK 42.50s 24/1029 t0004-unwritable OK 46.87s 25/1029 t0022-crlf-rename OK 43.77s 26/1029 t0014-alias OK 49.05s 27/1029 t0023-crlf-am OK 32.28s 28/1029 t0005-signals OK 49.83s 29/1029 t0018-advice OK 58.71s 30/1029 t0010-racy-git OK 64.75s On Linux, all tests were fast as expected. I built at commit 58b5801aa9 (The sixth batch, 2025-01-31) Any ideas? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "meson test" very slow on Windows 2025-02-01 22:56 "meson test" very slow on Windows M Hickford @ 2025-02-02 7:46 ` Johannes Sixt 2025-02-02 11:15 ` Patrick Steinhardt 2025-02-02 21:45 ` M Hickford 0 siblings, 2 replies; 5+ messages in thread From: Johannes Sixt @ 2025-02-02 7:46 UTC (permalink / raw) To: M Hickford; +Cc: Patrick Steinhardt, soekkle, Git Mailing List 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"? -- Hannes ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "meson test" very slow on Windows 2025-02-02 7:46 ` Johannes Sixt @ 2025-02-02 11:15 ` Patrick Steinhardt 2025-02-02 21:45 ` M Hickford 1 sibling, 0 replies; 5+ messages in thread From: Patrick Steinhardt @ 2025-02-02 11:15 UTC (permalink / raw) To: Johannes Sixt; +Cc: M Hickford, soekkle, Git Mailing List On Sun, Feb 02, 2025 at 08:46:46AM +0100, Johannes Sixt 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. Yeah, it's an unfortunate reality that tests are slow on Windows. It was also mentioned that the first ~20 tests are fast. This is expected, because the unit tests execute first, and these are way faster compared to the integration tests. > Please clarify: when you say "very slow on Windows with meson", do you > then mean "slower than with a Makefile build"? Judging from my own tests there is no significant difference between the two build systems. But in case there is I'd be happy to learn about it. Patrick ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "meson test" very slow on Windows 2025-02-02 7:46 ` Johannes Sixt 2025-02-02 11:15 ` Patrick Steinhardt @ 2025-02-02 21:45 ` M Hickford 2025-02-02 23:13 ` brian m. carlson 1 sibling, 1 reply; 5+ messages in thread From: M Hickford @ 2025-02-02 21:45 UTC (permalink / raw) To: Johannes Sixt; +Cc: M Hickford, Patrick Steinhardt, soekkle, Git Mailing List On Sun, 2 Feb 2025 at 07:46, Johannes Sixt <j6t@kdbg.org> 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: "meson test" very slow on Windows 2025-02-02 21:45 ` M Hickford @ 2025-02-02 23:13 ` brian m. carlson 0 siblings, 0 replies; 5+ messages in thread From: brian m. carlson @ 2025-02-02 23:13 UTC (permalink / raw) To: M Hickford; +Cc: Johannes Sixt, Patrick Steinhardt, soekkle, Git Mailing List [-- Attachment #1: Type: text/plain, Size: 2025 bytes --] On 2025-02-02 at 21:45:34, M Hickford wrote: > On Sun, 2 Feb 2025 at 07:46, Johannes Sixt <j6t@kdbg.org> 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 #2: signature.asc --] [-- Type: application/pgp-signature, Size: 263 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-02-02 23:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-01 22:56 "meson test" very slow on Windows M Hickford 2025-02-02 7:46 ` Johannes Sixt 2025-02-02 11:15 ` Patrick Steinhardt 2025-02-02 21:45 ` M Hickford 2025-02-02 23:13 ` brian m. carlson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).