Compilation is taking a ton of memory

Mario Silva mario at tripaneer.com
Wed Jun 27 16:00:37 UTC 2018


Hello,

Our code base has been growing steadily and it's currently at a 
point where my 16GB machine just freezes when we're compiling our 
code. This happens because DMD just consumes all my memory for a 
while.

Also, it's taking a long time to compile it. Less than an year 
ago our project was taking around 17 seconds to compile - no libs 
requiring compilation - and maybe around 50 seconds for full 
compilation, and it now takes around 50 seconds for an 
incremental compilations and around 1.5 minutes for a full one.

For you guys to have an idea of the size of our project, we have 
21151 lines of code and then 50933 in our libs. This is just our 
code without counting dependencies fetched by dub like vibe.d for 
example.

Are there any plans to work on compiler performance in terms of 
memory consumption and compilation time?

Any tips on how to code in a way that minimizes both compilation 
times and memory consumption when compiling?

Thanks,
Mario


More information about the Digitalmars-d mailing list