Compiling Ceph on an older machine (20-core Ivy Bridge) I noticed that one g++ invocation had racked up 7+ minutes of CPU time. It was librbd/migration/HttpClient.cc, which has 755 lines of code.
Of course it includes 19 include files, 8 of them Boost ones, and in total expands to about 2700 files and a third of a million lines of code, so maybe it's the input file that's crazy, after all.
It all reminds me of being back in the 80s, when you went for a cup of coffee after kicking off a compile. (well, to top it off I'm in a special kind of hell because I'm debugging CMake files, and have to rebuild the whole damn thing repeatedly.)