While working on my current project, the constant creep of increasing compilation times was becoming more and more noticeable. Even after throwing my usual tools at the problem, the total time was still over 7 seconds.
Compile time profiling showed that the blame lay with my liberal use of metaprogramming and
which I wasn’t willing to give up on.
The usual approach to reducing D build times is to split the program into packages,
compile one package at a time (to a static library or object file),
use D “header” files (
.di) to avoid parsing implementations more often than necessary,
then link everything together.
However, this was too much work, didn’t fit neatly into my existing toolchain, and I wanted to try something else. Continue reading →