Boost logo

Boost :

Subject: Re: [boost] [log] Comments
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2010-03-16 04:46:21


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?

Regards,

Rutger


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk