Can compilation times not be sped up any further?
Andre Pany
andre at s-e-a-p.de
Sun Oct 20 08:16:15 UTC 2019
On Sunday, 20 October 2019 at 05:44:14 UTC, H. S. Teoh wrote:
> On Sat, Oct 19, 2019 at 09:56:44PM +0000, Brett via
> Digitalmars-d wrote:
>> I have a huge code base... it seems D likes to recompile
>> everything every time from scratch. I realize there are ways
>> to fix this but can't D go a step further?
>
> Are you using dub? If you are, you might want to consider
> using a different build tool instead. One of the reasons I gave
> up dub long ago was because of its compulsion to rebuild
> everything from scratch every single time, which is unbearably
> slow. Now that I have my own build system setup with SCons, I'm
> much happier.
>
> Running dmd without dub is actually incredibly fast (compared
> to, say, C++) that you generally only need separate compilation
> for packages. Compiling all modules in a single package at once
> is generally fast enough that there's no need to go to the
> per-file level of granularity.
>
>
> T
In a dub package you can also organize your modules into sub
packages. These sub packages are only compiled when a source
module of it is touched.
This might already solve the problem. But yes, there are a lot of
potential in Dub to make it faster.
Kind regards
Andre
More information about the Digitalmars-d
mailing list