www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Speed up compilation

reply Alex <AJ gmail.com> writes:
Is there any way to speed of compiling a project(in Visual D) 
that changes very little but has a lot of dependencies that do 
not change?

Seems like D is recompiling everything, and while it does it 
relatively fast, it's about 15+ seconds even if I just change a 
single character in the entire project such as a initial 
value(anything).

Is compiling to object files going to help(Visual D does not do 
this as far as I know)?

Ideally everything that doesn't change would not be recompiled.
Apr 22 2019
parent reply Andre Pany <andre s-e-a-p.de> writes:
On Monday, 22 April 2019 at 19:41:03 UTC, Alex wrote:
 Is there any way to speed of compiling a project(in Visual D) 
 that changes very little but has a lot of dependencies that do 
 not change?

 Seems like D is recompiling everything, and while it does it 
 relatively fast, it's about 15+ seconds even if I just change a 
 single character in the entire project such as a initial 
 value(anything).

 Is compiling to object files going to help(Visual D does not do 
 this as far as I know)?

 Ideally everything that doesn't change would not be recompiled.
This seems rather strange. Do you maybe set the dub flag --force or -f which will cause a full rebuild? Or do you have a rather old dub version? I just guessing as I do not have experience with Visual D. I know for direct dub usage or usage of Intellij, the dependencies are built once, unless there is a need for rebuild. Kind regards Andre
Apr 22 2019
parent Alex <AJ gmail.com> writes:
On Monday, 22 April 2019 at 22:49:56 UTC, Andre Pany wrote:
 On Monday, 22 April 2019 at 19:41:03 UTC, Alex wrote:
 Is there any way to speed of compiling a project(in Visual D) 
 that changes very little but has a lot of dependencies that do 
 not change?

 Seems like D is recompiling everything, and while it does it 
 relatively fast, it's about 15+ seconds even if I just change 
 a single character in the entire project such as a initial 
 value(anything).

 Is compiling to object files going to help(Visual D does not 
 do this as far as I know)?

 Ideally everything that doesn't change would not be recompiled.
This seems rather strange. Do you maybe set the dub flag --force or -f which will cause a full rebuild? Or do you have a rather old dub version? I just guessing as I do not have experience with Visual D. I know for direct dub usage or usage of Intellij, the dependencies are built once, unless there is a need for rebuild. Kind regards Andre
Visual D doesn't use dub. There is a multiple objects file option but for some reason it causes the project to fail with unresolved externals from TypeInfo.* so I have no idea if it actually does anything or not.
Apr 22 2019