[ale] NEW Subject: Ccache

Danny Cox danscox at mindspring.com
Wed Jul 10 13:13:17 EDT 2002


All,

	Andrew Tridgel (of Samba) has updated a program that I knew nothing
about: compilercache.  It was a shell script (and other helper programs)
that cached compiler output, and used it again if a later run had the
same input file.  His version is written in C, and works a bit faster.

	Why might you use it?  If you ever perform a 'make clean; make', then
it's very useful.  It's the classic space versus time tradeoff, but
since drives are so large and cheap these days, why not?

	In my case, a complete build of our "distribution" (for our NAS
product) took over three hours.  This is on a dually Athlon 1.2 GHz and
1 GB RAM.  Using ccache, it takes a little over 40 minutes.

	I've been very pleased with the program.  You can limit the amount of
space the cache takes, and/or the number of files stored.

	If you don't care about how it works, please skip this paragraph.  It
runs each source file through the preprossessor, forms an MD4 hash, and
uses the hash for the file name.  If the file doesn't exist, it calls
the C compiler to produce it, and links the file in the cache with the
intended output (if it can, else it copies).  Later, if a file with that
hash DOES exist, it links it with the intended output, and updates the
last modified time.

	Get it at http://ccache.samba.org/ .

	Hope this helps someone!

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

Danny


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list