Re: One Big (std::) Header File?

From: Chris Theis (Christian.Theis_at_nospam.cern.ch)
Date: 10/22/04


Date: Fri, 22 Oct 2004 17:08:11 +0200


"Steven T. Hatton" <susudata@setidava.kushan.aa> schrieb im Newsbeitrag
news:A-idncnm7bXVI-XcRVn-tw@speakeasy.net...
> Chris Theis wrote:
>
> > In general you should only include the headers that are really required,
> > although with precompiled headers the story is a little different as you
> > say.
>
> I'm inclined to take the approach of creating a project_std.hh that
contains
> the standard headers used by the entire project. I don't like the idea
all
> that much. I very much believe in isolating components as much as
> possible. OTOH, if compile times are going to be sensitive to the order
in
> which headers are included, trying to manage that on a file-by-file basis
> throughout a project is probably a bad idea.
>
> > If your build process is still too slow, have you thought about a
> > parallel build?
>
> That depends what you mean. I kick of multiple processes when I build,
but
> I haven't attempted sharing the load between systems. I don't know how
> much getting my hyperthreading to work might impact the build times. As I
> said in another post, I'm not able to really experiment with the recently
> introduced pre-compiled header support in GCC, so I can't comment on
> whether it would make a significant difference. I do believe the KDE
folks
> may have done some things to speed up the build process. But I haven't
> been building the entire cvs image lately, so that's not an immediate
> issue.
>

What I meant by building in parallel is load-sharing. Unfortunately I only
know tools under windows that will do this for you in a comfortable way and
I have no experience doing this under linux. However, a quick google showed
that this seems to be a common approach at the companies providing linux
distributions. IMHO this is the only way to speed up your compilation
process if you cannot apply precompiled headers. In case you find another
solution (or a tool to perform comfortable parallel builds under linux) I'd
be happy if you let me know.

Cheers
Chris



Relevant Pages