
Ask HN: What to do when compiling a large C/C++ solution to remain productive? - M_Esc
I not infrequently find myself sat for up to 20 minutes with not much to do while my solution builds and compiles<p>- what do you do while you&#x27;re compiling?<p>OR<p>- What could I do in short bursts such as this to improve myself?
======
daemin
Try and figure out why it takes so long to build and see if the process can be
streamlined.

If it's the link time that is taking that long then consider splitting the
projects up into DLLs so that it's reduced or eliminated. (I assume you're on
windows because you said Solution, which means MSVC)

If it's just taking that long to compile, then consider using less templates,
more forward declares, less headers being included in headers. Precompiled
headers are a must too.

If all that has been done then consider using a distributed build system,
there are many out there from Incredibuild, proprietary stuff from Sony,
fastbuild, or other open source solutions.

Then there's also unity builds, but I despise them because they effectively
break certain forms of file based encapsulation.

------
twobyfour
Catch up on communications (email, slack). Get organized. Catch up on mailing
lists for important packages in my stack. Read a couple newsletters I
subscribe to, and the articles hey link to. Read HN.

I also keep a running list of stuff that I need to get done that isn't dead
urgent ("write up ticket about feature X" or "check with Bob to confirm that
customer was satisfied with solution to Y"). I can usually knock out a few of
those when waiting for compilation or similarly slow blocking tasks (in my
current stack, that's running database migrations).

------
HelloNurse
Invest in a fast computer. Many cores to compile in parallel, a lot of memory
to avoid swapping, fast SSD storage to access tens of thousands of files
quickly, good cooling to keep it running.

------
Davidbrcz
Keep your less productives tasks for those moments: reading mail, browsing
HN,... Or read some blog posts, books

------
chmike
learn Go

