[distcc] can distcc speed up the compilation of a single compilation unit?

Donald Webster fryfrog at gmail.com
Sat Sep 4 20:17:10 MDT 2010


I think in your case it would only be useful in the case that the
system you are compiling on is incredibly slow and you happen to have
access to another system that is incredibly fast, in which case why
not just compile on the incredibly fast machine?

I'm not a distcc champ or anything, but I'm quite certain your case of
a single .cpp file is not the target audience of distcc.

If you were to break it up into multiple .cpp files, you'd have a good
reason to use distcc though :)

AIM: fryfrog
WWW: http://www.fryfrog.com



On Sat, Sep 4, 2010 at 7:10 PM, Nathan Ridge <zeratul976 at hotmail.com> wrote:
> Hi Mihai,
>
> Thanks for your reply.
>
> What I mean by a "compilation unit" is a source code file (which may include
> many header files) which is compiled into an object file. Assuming one
> follows standard conventions, each .cpp file constitutes one compilation
> unit (while .hpp files do not).
>
> My project contains a single .cpp file which includes many header files. The
> header files contain the complete definitions of the classes they declare,
> including member function definitions (it has to be this way because they
> are all template classes, so separate compilation is not possible).
>
> What I'm wondering is, can distcc help improve the compilation of my
> project, or is it only useful for projects with multiple compilation units?
>
> Thanks,
> Nate.
>
> Date: Sun, 5 Sep 2010 03:55:04 +0200
> From: ionic at ionic.de
> To: distcc at lists.samba.org
> Subject: Re: [distcc] can distcc speed up the compilation of a single
> compilation unit?
>
> Hi Nathan,
>
> I am unsure about what you refer to by "compilation units".
>
> distcc redistributes every single file to different locations (distcc
> hosts).
> The linking is (naturally) done on the host machine (that one
> redistributing, too).
> Preprocessing can either be done on the local machine (normal mode), or
> on the other distcc hosts (distcc pump mode).
>
> It cannot split up a file and distribute chunks of that to different hosts.
>
> So, unless you've got only one file, distcc (at least theoretically)
> speeds up the build process.
>
> If this is not what you asked for, please try explaining it again, as I
> could only guess what you really meant.
>
> Best regards,
>
>
> Mihai
>
>
>
> * On 05.09.2010 03:38 AM, Nathan Ridge wrote:
>> Hello,
>>
>> I just came across distcc and it attracted my interest. I have a
>> question about how it works: can it speed up the compilation of a single
>> compilation unit, or can it only speed up the compilation of a project
>> that involves several compilation units?
>>
>> In other words, does distcc simply distribute compilation by having
>> different machines compile different compilation units and then linking
>> them together at the end (in this case each machine is still compiling a
>> complete compilation unit), or does it somehow split up a single
>> compilation unit into chunks and give each chunk to a different machine?
>>
>> Thanks,
>> Nate.
>
>
> __ distcc mailing list http://distcc.samba.org/ To unsubscribe or change
> options: https://lists.samba.org/mailman/listinfo/distcc
> __
> distcc mailing list            http://distcc.samba.org/
> To unsubscribe or change options:
> https://lists.samba.org/mailman/listinfo/distcc
>


More information about the distcc mailing list