libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libtool: minimise forks per invocation on cygwin and mingw.


From: Gary V. Vaughan
Subject: Re: [PATCH] libtool: minimise forks per invocation on cygwin and mingw.
Date: Thu, 8 Dec 2011 21:06:19 +0700

Hi Eric,

On 8 Dec 2011, at 19:56, Eric Blake wrote:
> On 12/08/2011 03:21 AM, Gary V. Vaughan wrote:
>> The recently pushed series of patches included the controversial
>> introduction of an additional 3 forks per invocation, which might
>> add a minute or two of wall-clock time to giant builds on windows.
>> By assuming that windows will run shell scripts on some shell with
>> all the modern optional features that libtool wants, this patch
>> eliminates even those 3 new forks.
>> 
>> Okay to push?
> 
> I'm a bit reluctant to do this via a host check;
> 
>> 
>> +# Forks are unreasonably slow under Windows, so we assume that, for at
>> +# least cygwin and mingw, /bin/sh is bash, and save at least 3 forks per
>> +# invocation:
>> +case $host in
>> +  *cygwin* | *mingw*)
> 
> Instead of doing it this way, I'd almost rather see:
> 
> if test "${BASH_VERSION+set}" = set; then

Face palm!  Absolutely, that is far more sensible.  Assuming we decide
to push this patch, I'll do it that way and ditch the host check.  Thanks!

> although if cygwin ever follows debian's lead of using dash for faster
> /bin/sh, I'm not sure if there is a reliable forkless way to detect dash.

I think we can worry about that later, if it ever happens.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]