On Mar 23, 2011, at 12:43 PM, Johan Engelen wrote:
Nota bene? I thought we'd rather have the comments in the .cpp, such that recompilation is much faster?
No, that placement does not really affect compilation times.
The main factor there is when you *change* documentation in a .h file. Then you cause files that have included it to be rebuilt.
Of course there are a few mitigating factors:
* One should not be changing documentation by itself very often. Thus doc cleanups won't carry a significant impact.
* By the time an average dev pulls a doc-only change, the chance is that he's also pulled other changes that will trigger rebuilds anyway. (we also have some nasty too-wide-ranging .h files that often trigger this)
* Header files should avoid including other header files (forward declarations, etc., can replace most #including). Thus the impact of any given change is lessened)
Bottom line is that merely being present in a .h file does not affect compilation times in any significant manner.