[ale] TOOL: ccache

Danny Cox danscox at mindspring.com
Fri Dec 6 11:08:24 EST 2002


	This is an excellent tool!  If you *ever* (or even better, many times
per day) perform a 'make clean; make', this is for you.  See
http://ccache.samba.org/ for more info.

	In my previous employment, our "trinity" tree would take ~3.5 hours to
build, start to finish on my dually 1.2 GHz Athlon with 1GB RAM.  Using
ccache reduces this to about 45 minutes.

	It's simply the classic time/space trade off.

	The basic operation is: run cpp on the source, form an MD4 hash of all
the tokens, plus a few other things (e.g. size and last modified time of
/usr/bin/gcc), and see if a file with that hash (in hex) is extant in
it's cache.  If it is, hard link it to the appropriate .o file.  If it's
not, run cc (gcc), and save it in the cache.

	You can set a maximum cache size (e.g. 512 MB), or a max # of files,
etc.

	If you have many computers to exploit, distcc (http://distcc.samba.org)
will shove compiles off to other machines.  You can even combine the
two.

	Which reminds me of a Steven Wright line: "I put instant coffee in a
microwave, and almost went back in time."

-- 
kernel, n.: A part of an operating system that preserves the
medieval traditions of sorcery and black art.

Danny

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list