Such gains by limiting included headers is surprising to me, as it's the first thing anyone would suggest doing. Clang-tidy hints in QtCreator show warnings for includes that are not used. For me this works pretty well to keep build times due to headers under control. I wonder, if reducing the amount of included headers already yields such significant gains, what other gains can be had, and what LOC we're talking about. I've seen dramatic improvements by using pch for instance. Or isolating boost usage.
Such gains by limiting included headers is surprising to me, as it’s the first thing anyone would suggest doing.
Yes indeed. I think this is a testament of the loss of know-how we're seeing in software engineering in general, and how overambitious but underworking developers try to stake claims in technical expertise when they even failed to onboard onto the very basics of a tech stack.
I'm sure it's a matter of time before there's a new post in Figma's blog showing off their latest advanced technique to drive down build times: onboarding ccache. Followed by another blog post on how Figma is researching cutting edge distributed computing techniques to optimize build times by replacing ccache with sccache.
I've had mixed results with ccache myself, ending up not using it. Compilation times are much less of a problem for me than they were before, because of the increases in processor power and number of threads. This together with pchs and judicously forward declaring and including only what you use.