3 ms·
Speeding Up C++ Rebuilds: A Time-Saving Solution for Incremental Builds
C++ developers spend a lot of time waiting for their code to compile. It's bearable if changes are incremental and not too many cpp files are affected. If change is applied to a fundamental header file, this often results in a very long compilation process just to find that deep down there is another problematic cpp file. This means iterations (code change and rebuild) get longer and longer. I know it's possible to compile a specific file/project manually, but it would be really cool to automate this and get to the problematic file sooner and not waste time recompiling files without issues…
So the idea is to accumulate compilation statistics and estimate the conditional probability of successful compilation of project files given information about already compiled files. So the build process can prioritize compilation and avoid compiling "similar" files.
Our company MatLogica is looking for an open-source C++ developer to implement this idea and we can sponsor development for ninja-build.
We think this can save a lot of man/hours in the world, make developers more productive and save on CPU energy bills.
Or perhaps a solution to this problem already exists?
- stefanos82 4y agoA combination of mold linker and ccache help quite a lot to be honest with you.
- dmit_gol 4y agoHi Stefanos, From ccache website "If you ever run make clean; make, you can probably benefit from ccache." This is not the case I'm describing here. I have no intention to do make clean. I want incremental rebuild. But the problem is if I'm making a change to fundamental header file it triggers recompilation of too many files that largely not affected by the change.