[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] PCH strategy
From: |
Vadim Zeitlin |
Subject: |
[lmi] PCH strategy |
Date: |
Sat, 30 Aug 2008 16:16:42 +0200 |
Hello,
I'd like to ask if you have any ideas about the best strategy for using
precompiled headers in LMI. In principle, the idea is simple: the PCH
should be created from the headers which are used by many files but rarely
modified. In practice however it may be difficult to find the right balance
between including too few headers (which means that many of them will still
need to be compiled for many files, slowing doing the build) and too many
of them (which means that full rebuilds will happen more often as any
change to any of the precompiled headers results in it).
Of course, you're probably aware of this problem as the comment in
pchfile.hpp indicates:
// This is merely a casual guess, not supported by any measurement of
// its effect on performance. The optimal set of headers to precompile
// probably varies by compiler. Including wx headers might impair
// performance for non-wx targets.
# include <wx/wxprec.h>
but I wonder if you have any hunches about what a better guess could be. In
particular, whether there any boost headers which are used often enough to
be worth including here (most of boost headers take a long time to compile)?
What about any rarely modified but widely used LMI headers? I can find the
widely used ones but I don't really know much about the "rarely modified"
part.
If not, I'll probably start with the existing pchfile.hpp just because it
seems like a safe bet -- using it will improve the compilation times a lot,
already.
Thanks,
VZ
- [lmi] PCH strategy,
Vadim Zeitlin <=