Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2007 09:27:22 -0500
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        ports@FreeBSD.org, Andrew Pantyukhin <infofarmer@FreeBSD.org>, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: More speed increases for make-ing ports
Message-ID:  <4652FDCA.2000305@math.missouri.edu>
In-Reply-To: <20070522161418.qu03u60iogsgsog4@webmail.leidinger.net>
References:  <465291FB.4010901@math.missouri.edu>	<20070522071941.GB59910@xor.obsecurity.org>	<cb5206420705220055x708caacdk766a19757c575981@mail.gmail.com>	<20070522110359.dwce59oaowkc400o@webmail.leidinger.net>	<cb5206420705220322n70b8e502l1f6de6b5564cd4b1@mail.gmail.com>	<4652EC0C.8030604@math.missouri.edu>	<cb5206420705220634m24ef4430u377eecbdfd2715b@mail.gmail.com> <20070522161418.qu03u60iogsgsog4@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Leidinger wrote:
> Quoting Andrew Pantyukhin <infofarmer@FreeBSD.org> (from Tue, 22 May 
> 2007 17:34:32 +0400):
>
>> On 5/22/07, Stephen Montgomery-Smith <stephen@math.missouri.edu> wrote:
>
>>> Incidently if you want to save a few more != assignments, I notice that
>>> setting the variables
>>> ARCH=i386
>>> OPSYS=FreeBSD
>>> OSREL=6.2
>>> OSVERSION=602110
>>> in /etc/make.conf will do this for you.
>>
>> A seemingly better way may be to make these system vars
>> available in make by default. They may even be compiled
>> in - to achieve virtually no performance impact (except
>> for a bit larger default var table).
>
> OPSYS can be made static (cvs commit to bsd.port.mk).

Before embarking on plans to implement it this way or that, how about 
some reports on whether this saves much time.  My initial profiling 
indicates that for an individual make, it might save a few tenths of a 
second, but when you do a whole bunch of makes in a row (like in 
pkg_version), somehow the run of things like "uname -p" gets cached, and 
it turns into a few hundreths of a second per make.  I might also add 
that the OSVERSION (which is the result of awk) seems to be very quick 
compared to the invokations of uname (which is what the others are).

In other words, the time savings might just not be that worthwhile pursuing.

Stephen




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4652FDCA.2000305>