
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