From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: M Hickford <mirth.hickford@gmail.com>
Cc: Johannes Sixt <j6t@kdbg.org>, Patrick Steinhardt <ps@pks.im>,
soekkle@freenet.de, Git Mailing List <git@vger.kernel.org>
Subject: Re: "meson test" very slow on Windows
Date: Sun, 2 Feb 2025 23:13:54 +0000 [thread overview]
Message-ID: <Z5_8MuRxJKZm2bdH@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <CAGJzqsmo988VwABNgozwQEKBe-nyfw9f2G2obygqs8OtuYpeiQ@mail.gmail.com>
[-- 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 --]
prev parent reply other threads:[~2025-02-02 23:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z5_8MuRxJKZm2bdH@tapette.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=mirth.hickford@gmail.com \
--cc=ps@pks.im \
--cc=soekkle@freenet.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.