Ninja (.ninja_log) & CMake Build Bottleneck Analyzer
Drop a raw build/.ninja_log (or CMake --profiling-output JSON) straight into your browser—no Python ninjatracing install required. Pinpoints your slowest C++ translation units, plots core parallelism, and exports a Perfetto / chrome://tracing JSON file in one click.
| # | Output Target | Start | End | Duration | Share of Wall |
|---|
Find Slow C++ Compilation Bottlenecks Directly From .ninja_log
Slow C++ builds kill developer velocity, yet finding which three `.cpp` files or link steps are stranding 15 of your 16 CPU cores idle normally requires installing Python scripts like ninjatracing to convert `.ninja_log` into Chrome Trace JSON before opening Perfetto. This tool eliminates that pipeline: drop your raw `.ninja_log` directly into the browser to see wall-clock time, CPU concurrency, lane timeline, and slowest targets immediately—and still export standard Perfetto JSON whenever you want deep zoom.
Browser .ninja_log Analyzer vs. ninjatracing + Perfetto CLI
| Criteria | QuickCoderHub (In-Browser) | Python ninjatracing + Perfetto |
|---|---|---|
Direct .ninja_log Drop | Yes — reads raw Ninja v5/v6 logs directly with zero install | Requires installing/running Python ninjatracing first |
| Top-Slowest Ranking Table | Instant sorted bottleneck table + % of wall time | Perfetto requires manual SQL/slice sorting |
| Perfetto Interop | 1-click Chrome Trace JSON export built in | Manual CLI redirect |
Frequently Asked Questions
Why does my `.ninja_log` contain multiple builds appended together?
Ninja appends every incremental build to the same `.ninja_log` file with timestamps resetting back to `0 ms`. Keeping Latest build pass only checked automatically slices out only your most recent run.
Can I also profile slow CMake configure times here?
Yes. Run cmake -S . -B build --profiling-format=google-trace --profiling-output=cmake_profile.json and load `cmake_profile.json` above to rank the slowest `find_package()` and `add_subdirectory()` steps.
What should I do when 2–3 `.cpp` files dominate the tail of my timeline?
Split monolithic template/header-heavy translation units, introduce Precompiled Headers (`target_precompile_headers` in CMake), enable `ccache`/`sccache`, or switch from GNU `ld` to `lld` / `mold` for slow final link steps.
Are my internal build paths uploaded to a server?
Never. All log parsing and canvas rendering execute 100% client-side in your browser.