Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2007 20:52:15 -0500 (CDT)
From:      Stephen Montgomery-Smith <stephen@math.missouri.edu>
To:        Doug Barton <dougb@freebsd.org>
Cc:        ports@freebsd.org, Alexander Leidinger <Alexander@Leidinger.net>
Subject:   Re: Speeding up pkg_version and perhaps other port utilities
Message-ID:  <20070520204725.S52261@math.missouri.edu>
In-Reply-To: <4650C9C0.3080706@FreeBSD.org>
References:  <464FD334.9040705@math.missouri.edu> <20070520082931.47fe8db9@deskjail> <4650C9C0.3080706@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On Sun, 20 May 2007, Doug Barton wrote:

> Alexander Leidinger wrote:
>> Quoting Stephen Montgomery-Smith <stephen@math.missouri.edu> (Sat, 19 May 
>> 2007 23:48:52 -0500):
>> 
>>> On my system, the program pkg_version can double its speed simply by 
>>> replacing "make -V PKGNAME" by "make BEFOREPORTMK=yes -V PKGNAME"
>
> This is very cool! I've already added it to my devel version of portmaster in 
> several places. I call make a LOT in portmaster, so I went through every 
> invocation and added this wherever it worked (i.e., didn't cause a difference 
> in (or absence of) output.
>

However just because it works in a majority of cases doesn't mean that it 
will work all the time.  You just don't know what important thing might be 
in AFTERPORTMK, which 99% of the time you never need.

So I see two approaches:

1.  Add more .if's to bsd.port.mk so that there is a more efficient "make 
VARIABLEONLY=yes -V variable-name" that does all the variables, but 
doesn't calculate any of the targets - this might make things a bit 
faster, or it might not;

2.  Profile bsd make and see if there are any bottlenecks.  I bet make was 
never designed for speed in these kinds of situations.  But this would be 
a long term project, albeit definitely worth doing.

Stephen




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