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.

Sample loaded
Wall-Clock Time
0.0s
Total CPU Time
0.0s
Avg Parallelism
0.0x
Targets Built
0
PARALLEL BUILD TIMELINE (PACKED WORKER LANES)Hover or inspect top bottlenecks below
TOP SLOWEST BUILD TARGETS
#Output TargetStartEndDurationShare 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

CriteriaQuickCoderHub (In-Browser)Python ninjatracing + Perfetto
Direct .ninja_log DropYes — reads raw Ninja v5/v6 logs directly with zero installRequires installing/running Python ninjatracing first
Top-Slowest Ranking TableInstant sorted bottleneck table + % of wall timePerfetto requires manual SQL/slice sorting
Perfetto Interop1-click Chrome Trace JSON export built inManual 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.

Related C++ & Build Tools