Any takers for http://d.puremagic.com/issues/show_bug.cgi?id=9673?
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Mar 10 10:13:39 PDT 2013
On 3/10/13 7:25 AM, Rainer Schuetze wrote:
> I don't have support for building on multiple cores, but trying it on
> visuald itself (48 files) yields
>
> - combined compilation 6s
> - single file compilation 1min4s
>
> You'd need a lot of cores to be better off with single file compilation.
>
> These are only the plugin files, not anything in the used libraries
> (about 300 more files). Using dmd compiled with dmc instead of cl makes
> these times 17s and 1min39s respectively)
>
> Almost any change causes a lot of files to be rebuilt (just tried one,
> took 49s to build).
I understand. However, I don't think that's not enough support for
generalization.
Phobos is 197KLOC. At work I work on a C++ project that has k more lines
of code, where k is a small number. Phobos uses separate compilation for
its unittests, which are quite thorough, and compiling and running them
all with make -j8 takes under two minutes on one single laptop. (The use
of -j is crucial.) Building from scratch the C++ project is a small
tectonic event involving dozens of machines and lasting much longer than
k times more.
A large project is also more likely to manage dependencies in ways that
reduce impact of individual file changes, something that apparently
isn't the case for visuald.
What I'm saying here is that incremental builds are a valid choice for
certain projects, and is possibly a gating factor to building large
codebases with rdmd.
Andrei
More information about the Digitalmars-d
mailing list