|
Boost Users : |
Subject: Re: [Boost-users] Boost & Continuous Integration
From: John Maddock (john_at_[hidden])
Date: 2009-04-27 05:00:20
> One of the requirements for a continuous integration process is that the
> build for a specific target be quick. Something under 10 minutes is ideal.
> I
> find that when not using precompiled headers, boost can significantly
> impact
> the compilation time of the project. I've experienced 20 minute compiles
> when using boost fairly extensively throughout the code base.
>
> So far I only see two obvious solutions to this problem. First, use
> precompiled headers. I really don't want to do this because it causes
> issues
> with include dependencies and makes the code not reusable as a result. The
> second option is to beef up the machines doing the compiles, however this
> can have diminishing returns.
>
> I am sure that a lot of people in the community have had this specific
> issue
> with Boost's compile times, as well as in many other areas. What would you
> guys recommend? Is there any other solution beyond the obvious?
I think most of the solutions have been expanded already:
* precompiled headers (I know dependencies are a killer).
* Use the Pimpl idium to hide Boost dependencies from class interfaces, and
therefore remove them from the build (but then you loose inline expansion
which may be an issue).
The big question though, is what is it *specifically* that's causing the
long compile times? Once you know that you can try and isolate the problem
code to a single translation unit.
One other thing that may help, if you have headers that make extensive use
of metaprogramming via mpl for example: if say 90% of the code is
instantiating the same template instances, then providing full
specializations of those templates *without* the metaprogramming logic can
be a big win.
HTH, John.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net