I don't think using ninja vs GNU make would make any difference... those gaps occur while neither is running.
But it seems cmake is single-threaded and quite slow.
Perhaps #KDE should coalesce most of its frameworks into a monolithic repo.
Distros can continue packaging the resulting libs into a gazillion separate modules, if they want to (but don't see the point, given that most kf5 libs are required by the core desktop anyway).
Total build time: 29 minutes. Not bad!
I disabled building Qt 5 from sources because the system version is fine.
I tried adding `cmake-generator Ninja` in my kdesrc-buildrc, but it produces much larger rules.
For instance, the build.ninja for kwin is 12MB, while the combined size of all Makefiles was only 5MB.
Both make and ninja are smart enough to keep respawning g++ instances until all cores are busy.