www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DUB: Multiprocess?

reply Ivan Trombley <itrombley dot-borg.org> writes:
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?
May 14
parent reply Basile B. <b2.temp gmx.com> writes:
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.
May 14
parent reply Ivan Trombley <itrombley dot-borg.org> writes:
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.
May 14
parent =?UTF-8?B?U8O2bmtl?= Ludwig <sludwig outerproduct.org> writes:
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.
May 14