[C++-sig] Big slow compilation

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Sun Nov 2 17:20:15 CET 2003

Thanks to Bruno a.k.a Nicodemus there is a nice section on "Reducing compile
times" in the CVS version of the Boost.Python tutorial:


Splitting up your project in suitable ways will make a big difference for your
development work. I have a project that takes an hour to compile from scratch
(with one CPU), but recompiling the bit that I am working on often takes less
than a minute. Unless I am changing core facilities like my array bindings. In
that case I am sure to use parallel builds (scons -j or bjam -j) which cuts
down recompiling from scratch to a little over 15 minutes on a $3k PC (2 CPU
Xeon with hyper threading turned on) with gcc 3.2.


--- Greg Abbas <greg at abbas.org> wrote:
> I've got a question. I just returned to a project that I had written about a
> year ago using boost::python version 1.28 (I think). After updating my
> Debian system I had trouble resolving all the old dependencies, so I decided
> to try 1.30, and gcc version 3.2. Now, my program (the boost::python part of
> it is 1500 lines long) won't even compile on the old 256MB machine, so I
> switched to a different Debian box that has 1GB of RAM and it compiles but
> takes about 10 minutes. If I turn off debugging (no "-g3") then I can get it
> down to about 3 minutes, but that's still pretty different from all my other
> source files (some of which are a lot longer) that compile in a few
> _seconds_. Is this the result of boost, or gcc, or what? It's kind of a
> bummer because it makes my development cycle really slow. Is there anything
> I can do? (Besides go out and buy some overclocked watercooled hotrod CPU
> :-D).

Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

More information about the Cplusplus-sig mailing list