
Ask HN: How much compile time is unbearable? - photawe
Clearly, language will be an issue here.<p>Curious what you guys think.<p>For me, in C#:<p>&lt;2s - dream come true;
5s - niiice;
10s - acceptable;
10-15s - bad;
20+s - insanely bad;<p>I&#x27;ve moved away from C++ mainly because of compile times. While templates are insanely awesome, code using them ended up with insane compile times.<p>C#&#x2F;Winforms - insanely fast compile times<p>C#&#x2F;WPF - very fast compile times (5-10 seconds, in 50-100K LOC solutions)<p>C#&#x2F;UWP - MS quality; compile times are in the minutes
======
burfog
From experience with a problematic build system, the compile time is
unbearable when it exceeds the number of hours in a day. Each automated
nightly build is started before the previous one has finished. This overloads
the machine, making the builds take even longer. You have to switch to weekly
builds.

It's not all bad. It trains you to think carefully, producing code that
compiles correctly on the first try. You learn to write bug-free code.

~~~
photawe
Yeah, I'm with you on that one. However, in the last few years, I've been
working on UI code - and that is very very different (IMO). Developing a
complicated UI control will require lots of small changes, which each trigger
a new compilation. And if that compilation takes 45-90 seconds, it kinda'
kills the mojo :)

------
simonblack
What is unbearable is purely subjective.

If you're used to 2 seconds start to finish, then 2 minutes is horribly
unbearable.

On the other hand, if you're used to 30-40 minutes (as was 'normal' for
compiling a linux kernel on older machines back in the 90s or thereabouts)
then 2 minutes is miraculously _fast_!

~~~
photawe
Agreed. However, I assume there are other ways to compile parts of the system
so you can test parts of it, to make it bearable. But yeah, compile times like
that would send me off a cliff.

------
gjvc
[https://ccache.dev/](https://ccache.dev/)

~~~
photawe
Thanks for the link, but I'm pretty sure this wouldn't really solve my (C++)
issues. MSVC does quite a lot of caching, and still runs into a looot of
compilation times (and also, link times, which I initially forgot to mention
;))

~~~
gjvc
Ah well, on Linux it really is night and day. One of my recent projects was to
bring the no-change build time down from ~20 minutes. I managed to get it down
to ~35 seconds and ccache was responsible for the majority of that speedup.

~~~
photawe
Congrats ;) Yeah, that is very very different than what I've encountered over
the years.

