make-w32
[Top][All Lists]
Advanced

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

GMAKE speed ups.


From: Bijal Shah
Subject: GMAKE speed ups.
Date: Thu, 6 Mar 2003 17:52:19 -0000

I thought others might be interested in the findings of doing some gmake
performance improvements - I sought advice here and Paul Smith was kind
enough to help me along the way.

Problem: It was taking GMAKE some 4.5 seconds to decide nothing was needed
when building a library from 5 source files. A large number of headers for
these files were on the network. With all the files local, the processing
time was 1.3 seconds. With "gmake -r" on the network, the time went down to
.6 seconds.

It is possible to achieve the same level of speed up by changing the
makefiles themselves rather than using the "-r" option. The following
describes how...

Part1:
======
Add the following rule to the makefile.

  .SUFFIXES:

This resulted improvement to 2.6 seconds for the same GMAKE invokation.

Part2:
======
Explicitly disable the built-in rules - there isn't an easy way to do this,
but its worth it. These can be found with "gmake -p", but here is the full
list anyway:

%: %.c

(%): %

%.out: %

%.c: %.w %.ch

%.tex: %.w %.ch

%:: %,v

%:: RCS/%,v

%:: RCS/%

%:: s.%

%:: SCCS/s.%

.c:

.texinfo.info:

.mod.o:

.c.o:

.s:

.txinfo.dvi:

.y.c:

.web.tex:

.s.o:

.F.f:

.web.p:

.F:

.cc.o:

.S.s:

.def.sym:

.F.o:

.f:

.y.ln:

.texi.dvi:

.texinfo.dvi:

.p.o:

.r.f:

.w.tex:

.txinfo.info:

.o:

.c.ln:

.l.r:

.r.o:

.C.o:

.p:

.l.c:

.sh:

.cc:

.f.o:

.texi.info:

.cpp.o:

.l.ln:

.S.o:

.tex.dvi:

.r:

.mod:

.C:

.S:

.w.c:

.cpp:

This improved the performance further to .6 seconds. I did some basic
analysis to figure out what was taking the most time out of all these rules
and it has proven to be the :: rules for RCS and SCCS updating. Even with a
few files, the checks that these rules invoked added significantly to
overall processing time.

I hand not seen the level of the problem before, but in the system I am
working on, there are several hundred gmake invokations and overall build
time is high. Obviously, the benefit here is limited to the GMAKE processing
time and only relevant when accessing files on network drives, but every
little helps...

B.




reply via email to

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