tech-userlevel archive

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

Re: make: should -j affect cwd?



On Wed, Jan 18, 2012 at 01:41:29PM -0500, Steven Bellovin wrote:
 > > One of the problems with the current make is performance. Doing a simple
 > > ktrace , then kdump | grep NAMI reveals that each path is stat'ed
 > > four times
 > > one of them completely redundant, since it was just stat'ed before. There
 > > has been a lot of sandbagging in the path resolution code, to fix bugs by
 > > adding extra checks without understanding the original source of
 > > the problem.
 > > 
 > > The second main issue is variable evaluation, and the recent abuse of
 > > ${VAR:Uconstantstring}. Running a profiled make in libc reveals that 20%
 > > of the run is spent in tolower() and ApplyModifiers(). 50% of the run
 > > is spent doing stat().
 > 
 > Without disputing any of your factual statements, is this really important?
 > Make gets a workout when it's being used to build large projects, but in
 > such cases I suspect -- but haven't measured! -- that compilation time
 > strongly dominates total runtime.

# pwd
/usr/src/lib/libc
# time make -n > /dev/null
1.408u 0.470s 0:01.87 100.0%    0+0k 0+0io 0pf+0w
# 

That's a pretty fast amd64. The fact that it takes a measurable amount
of time means it's really damn slow on a vintage box.

It's a bigger issue in pkgsrc, at least in places, although some of
the worst problems were cleaned up a while back.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index