Subject: Re: build.sh efficiency
To: William Allen Simpson <wsimpson@greendragon.com>
From: Perry E.Metzger <perry@piermont.com>
List: current-users
Date: 11/06/2003 09:16:03
William Allen Simpson <wsimpson@greendragon.com> writes:
> If I am reading it correctly, it appears to run through the whole tree
> deleting objects, then again making objdirs, and again depending, and
> again compiling, etc.
>
> It seems to me that this is highly inefficient disk activity. The
> memory cache is going to lose locality, with everything read in multiple
> times (unless your memory is as big as the src+obj).
>
> Would it be possible to run through the tree once, doing multiple tasks?
> Or maybe only twice?
This is the observation I made when I did the "make dependall" cleanup
long ago. I turned a "make depend" followed by "make" step into "make
dependall", which radically sped things up because all sources were
put into the cache during the "make depend" in any given directory.
However, it is necessary that the whole tree be cleaned and all
objdirs in place before the "make dependall" step starts because of
various sorts of reachover activities -- you'd get subtle ugly bugs if
that wasn't done.
The real, far worse problem is how slow "make" is in practice, at
least at the moment. That's what is really the rate limiting step in
the "make obj" step, for example. I did some speedups for "make" a
while back that partially helped, but someone profiling "make" and
cleaning it up further might be a big help.
--
Perry E. Metzger perry@piermont.com