DUB: Multiprocess?

Sönke Ludwig via Digitalmars-d digitalmars-d at puremagic.com
Sun May 14 15:07:48 PDT 2017


On Sunday, 14 May 2017 at 21:41:58 UTC, Ivan Trombley wrote:
> On Sunday, 14 May 2017 at 21:01:37 UTC, Basile B. wrote:
>> On Sunday, 14 May 2017 at 20:23:17 UTC, Ivan Trombley wrote:
>>> When I build C++ projects using make, I can specify how many 
>>> processes I want to use (-j). This keeps the processors full 
>>> and happy and greatly reduces the overall build time. Does 
>>> DUB have a similar way of compiling each file in it's own 
>>> process or thread?
>>
>> There's the "--parallel" switch for that. Example
>>
>>> dub build --build=release --parallel
>>
>> It's in the documentation.
>
> I tried that and only one processor is used. The rest are idle.

It currently is only implemented for "--build-mode singleFile", 
but this build mode is usually a lot slower than building each 
package at once. Implementing it for the latter mode is planned 
as well, but it should be noted that depending on the project 
this will require a lot of RAM.


More information about the Digitalmars-d mailing list