Building is slow!
Arek
arychlinski at gmail.com
Sat Dec 2 14:34:58 UTC 2017
On Saturday, 2 December 2017 at 09:50:32 UTC, Ivan Trombley wrote:
> On Saturday, 2 December 2017 at 03:08:10 UTC, rjframe wrote:
>> There is a --parallel flag: `dub build --parallel`.
>>
>> The help string says it "Runs multiple compiler instances in
>> parallel, if possible."
>
> Thanks, I'll give that a try. After an hour, I pressed CTRL+C,
> shut it down and went home.
By default, when you run `dub build` building is done in mode
'separate', what means all source files are compiled at once in
one dmd instance.
In case of big project it can consume a lot of memory and
sometimes swaps intensively.
Also "--parallel" doesn't change anything, because there is only
one process of the compiler so it runs on one core only.
You can try `dub build --build-mode=single-file --parallel`. It
will execute separate instance of compiler for each source file.
If --parallel is given, dub will launch several instances of dmd
in parallel.
More information about the Digitalmars-d
mailing list