March 22, 2009 Re: How to reduce compile times? | ||||
---|---|---|---|---|
| ||||
Posted in reply to grauzone | On Sat, Mar 21, 2009 at 3:45 PM, grauzone <none@example.net> wrote:
>
> Also, I noticed that "dsss build -full" seems to be the way to pass this flag on the command line. But the project is recompiled even when no file was modified at all. This is not good: it should only recompile if something has changed.
Why would you recompile if you haven't changed anything? :P
|
March 22, 2009 Re: How to reduce compile times? | ||||
---|---|---|---|---|
| ||||
Posted in reply to grauzone | grauzone wrote: > In my case, this practically always causes linker errors. Of course I don't know why. You could change the order of object files by linking. if you have -> gdmd bbb.o aaa.o ccc.o -o binrary (-L..... -l....) change to -> gdmd aaa.o bbb.o ccc.o -o binrary (-L..... -l....) or change to -> gdmd aaa.o bbb.o ccc.o aaa.o bbb.o ccc.o -o binrary (-L..... -l....) -- Xu, Qian (stanleyxu) http://stanleyxu2005.blogspot.com |
March 22, 2009 Re: How to reduce compile times? | ||||
---|---|---|---|---|
| ||||
Posted in reply to grauzone | grauzone wrote: > Brian wrote: >> On Sat, 21 Mar 2009 15:44:41 +0100, grauzone wrote: >> >>> I'm using dsss (with dmd under Linux) to compile my project, and >>> build/compile times are reaching unacceptable highs. >> >> out of curiosity, how much code do you actually have? im using D for something with ~12,000 lines of code right now, spread among 40 files or so, with a somewhat excessive use of CTFE and templates all over. a full rebuild takes about 5 seconds with incremental builds taking 1 or 2 seconds in most cases. >> >> i just wanted to know what "excessively high" means >> >> P.S. using dmd 1.036, rebuild 0.78, phobos, linux > > 65906 physical lines of code (+ some Tango .di imports + some small external libraries), maybe 200+ files, takes 1m10s to build when using normal dsss. With -full and oneatatime=no, compile time goes down to 6-7 seconds. It's not that template- and CTFE-heavy. > > Incremental builds can take relatively long (depending where the changed files are in the dependency tree), and it's really annoying. I think it is normal. try to copy all files to a ram disk and then compile them again. -- Xu, Qian (stanleyxu) http://stanleyxu2005.blogspot.com |
March 23, 2009 Re: How to reduce compile times? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> On Sat, Mar 21, 2009 at 3:45 PM, grauzone <none@example.net> wrote:
>> Also, I noticed that "dsss build -full" seems to be the way to pass this
>> flag on the command line. But the project is recompiled even when no file
>> was modified at all. This is not good: it should only recompile if something
>> has changed.
>
> Why would you recompile if you haven't changed anything? :P
If you have a build script that invokes the compiler among many other things, a continuous integration system, etc.
|
March 23, 2009 Re: How to reduce compile times? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jarrett Billingsley | Jarrett Billingsley wrote:
> On Sat, Mar 21, 2009 at 3:45 PM, grauzone <none@example.net> wrote:
>> Also, I noticed that "dsss build -full" seems to be the way to pass this
>> flag on the command line. But the project is recompiled even when no file
>> was modified at all. This is not good: it should only recompile if something
>> has changed.
>
> Why would you recompile if you haven't changed anything? :P
I want to build system to recompile the program automatically before I execute it. Doing this manually is not an option, because it's annoying and I could forget it.
|
Copyright © 1999-2021 by the D Language Foundation