How to reduce compile times?

Qian Xu quian.xu at stud.tu-ilmenau.de
Sun Mar 22 14:38:26 PDT 2009


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


More information about the Digitalmars-d-learn mailing list