Boost logo

Boost :

Subject: Re: [boost] [log] Comments
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-03-16 07:03:18

On Tuesday 16 March 2010 11:46:21 Rutger ter Borg wrote:

> Vladimir Prus wrote:
> > I have now measured the compile time performance. An file that outputs a
> > string to std::cout and does nothing else takes 0.27 seconds to compile on
> > my system. Compiling the main.cpp from 'log/example/trivial' takes 2.47.
> > For avoidance of doubt, I've repeated timing several times, with no
> > significant deviation, and it's naturally hot cache case.
> >
> > So, including Boost.Log headears appear to add 2.2 seconds to compilation
> > time. This might sounds not much, but it adds up. For example, one part of
> > KDE, named kdevplatform, has 562 files. So, if every one of them starts to
> > use Boost.Log, that would add 1236 seconds, or 20 minutes, to the
> > compilation time. The problem is that complete build of that project
> > (which already uses KDE's logging mechanisms), takes 16 minutes.
> Sorry for jumping in. At the risk of asking a silly question: shouldn't the
> include guards kick in and keep this overhead in the realms of constant time
> instead of linear time?

No, I don't think so. Each source file is compiled separately.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at