Cutting down compile time

Roberto Teixeira maragato at conectiva.com
Tue May 21 19:24:45 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

in case you don't know about it yet, I suggest you get acquainted with ccache 
(http://ccache.samba.org). From the website:

	"ccache is a compiler cache. It acts as a caching pre-processor
	to C/C++ compilers, using the -E compiler switch and a hash to
	detect when a compilation can be satisfied from cache. This
	often results in a 5 to 10 times speedup in common
	compilations."

And it works too :-) Artsd takes 13 minutes to compile in my box normally. 
With ccache it now compiles in just above 3 minutes.

For everyone who cvs-clean's in every compilation, ccache can greatly reduce 
compiletime. And the best thing about it is its simplicity of use. You don't 
have to patch anything, all you have to do is create symlinks like this:

	ln -s /usr/bin/ccache /usr/local/bin/gcc
	ln -s /usr/bin/ccache /usr/local/bin/cc
	ln -s /usr/bin/ccache /usr/local/bin/g++

Supposing you ccache is in /usr/bin and /usr/local/bin comes first in $PATH 
than the place where the real gcc files are. Then you just use gcc/g++ as you 
always did. That's the greatest thing about ccache, you don't even notice 
it's there (unless for the reduced compiletime).

- -- 
maragato at conectiva.com | roberto at kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE86pDzF22Y2BQEMsYRAsp1AJ9nM2+7mFCW0cE3ZstPQTy10FwfjACgwO6p
BEmCmIrDZYjKybpmljgQF+Y=
=yEpO
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list