[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Reducing build times



Would anyone object to me programatically removing any explicit
includes of any .h files which are already included in camtypes.h?

I am pretty sure gcc does not have MSVC's "don't even bother
opening this header because you've seen it all before" optimization,
and gcc 3.4 (build server) definitely doesn't.

There's no reason to have these files included in cpp files,
and they are normally also wrong in .h files (exception: .h
files which are actually in the pch which may need them).

This should speed up build times, and discourage others from
using pointless includes.

Question: Should I
a) Remove references only to .h files /explicitly/ included
   in camtypes.h (i.e. there is a "#include" there)
b) Remove references to .h files explicitly or implicitly
   included in camtypes.h (e.g. ones included from another
   .h file).
c) As (a) but after ensuring there are no implicitly
   included .h files (i.e. make them all explicit).

The latter is safe, but gives a greater likelihood of
compile errors if an .h file in the pch is changed not
to include a given file.

My preference is (c).

Alex