8 ms·
Probably a giant C++ codebase. Our CI runs can take well over an hour. C++ compiles so damn slowly compared to Java.
by tcoff91 9y ago
Probably a giant C++ codebase. Our CI runs can take well over an hour. C++ compiles so damn slowly compared to Java.
- inetknght 9y agoYou should probably hire better C++ developers if it takes that long.
- wutwutwutwut 9y agoHow long should a giant C++ code base take to compile?
- snovv_crash 9y agoWith a good CMake configuration and Ninja and ccache, a minute or two max. Your CMake makes incremental builds safe, and the ccache saves you when switching between branches.
- inetknght 9y agoCMake helps a good bit, ccache goes further, and ninja helps a bit too. But none of them can help templated header-only libraries with complex interdependencies. It gets particularly bad when the developer #includes a convenience header to bring in _everything_ in the library instead of just what they need.
- snovv_crash 9y agoAgreed. Good use of PImpl when you have large external header-only libraries is also generally recommended to keep the dependency graph nicer. Also from what I've seen, large header-only codebases tend to be external and thus generally don't change that much, so if you can limit your own internal dependency tree ccache can still save you.
- inetknght 9y agoHow giant is giant? I've seen tens of thousands of lines of code compile in 30 minutes. I've seen a hundred thousand lines of code compile in 2 minutes. It really depends on how the project is laid out. If you're using lots of header-only libraries and try to compile monolithically (like soooooo many C++ applications do these days), you're going to have a bad (compile) time.
- baq 9y agotens of thousands? that's small. we're talking MLOCs here.
- corndoge 9y agoyou should probably become more experienced in c/c++ development before sharing your opinion
- btilly 9y agoYou should see how quick C++ compilation times can be a competent organization like Google before dismissing that opinion.
- deleted 9y ago[deleted]
- InclinedPlane 9y agoAre you talking about clean builds or incremental builds?
- btilly 9y agoThey usually do incremental builds. And a lot of work goes into reproducible builds so that incremental builds can be trusted. But even clean builds are typically minutes of wall-clock time. Not hours. Of course part of the trick is that work has been distributed across a cluster, so a lot longer was spent compiling than that...
- unvs 9y agoMaybe you shouldn't prejudge the quality of developers on a project you know nothing about