How to understand million-line C++ projects
summary
A concrete workflow emerges: scan a 7 million line C++ codebase with ~500 components, detect dependency cycles and measure their cost, iterate from slow shell scripts to Python to a C++ tool that shrinks runtime from minutes to 1.1 second interactive queries, find a single header causing 33,000 lines to be included in 7,200 builds (≈300 million compiled lines), generate CMake target lists, enforce checks in CI, and report 325 million paths between components so teams can remove dead headers and split monoliths.
AI-written summary · about
chapters (43)
- 0:00Introduction
- 0:19Hard to understand
- 0:39Long run time
- 2:24The solution
- 3:53What many people do
- 4:30Its not just you
- 5:12Take the code base
- 6:09Code is a cost
- 7:12Test coverage
- 8:19Tools
- 10:32Better
- 11:52Navigation
- 12:14Readability
- 12:44Stable
- 13:37Duplicates
- 14:42Component size
- 15:29Mental load
- 16:39Component responsibility
- 17:11Appendix
- 18:21Codebase
- 18:56Read all code
- 19:26Extract function
- 20:42Interactive user
- 21:34Optimizing
- 22:06Counting
- 23:30dependencies
- 24:16high level vs low level
- 24:51monoliths
- 25:46Swiss Army Knife
- 26:06Cycles
- 28:20Headers
- 30:01Example
- 31:11Coherent
- 32:04Overdependent
- 32:41Encapsulation
- 35:22Questions
- 36:07Do you share the tool
- 37:23Can you do with switcher
- 39:05Linktime optimization
- 41:04Virtualization
- 42:06Header dependencies
- 43:14Private headers
- 44:28Cycles in the build
related talks
01h 03mBringing Clean Code to large scale legacy Applications
49mC++ in Huge AAA Games
01h 20mDealing with software dependencies
01h 03mHow Microsoft Uses C++ to Deliver Office - Huge Size, Small Components
56mPractical C++17
44mCompilation Speedup Using C++ Modules: A Case Study
01h 02mCMake and the Future of C++
02h 02mIt's Complicated
