kicad-developers team mailing list archive
Mailing list archive
Re: Benchmarking kicad compilation on CPUs released 6 years apart
On Mon, Oct 28, 2019 at 10:20:45PM -0700, Andrew Lutsenko wrote:
> I kinda expected 2x maybe 3x decrease because not all computations scale
> linearly with number of threads. I was pleasantly surprised by almost 6x
> decrease in clean build time and 5x in incremental builds.
FWIW, we have a number of bottlenecks in the build process:
- dependency generation of common doesn't start until the version header
is generated, which only happens after bitmaps and gal are complete
- dependency generation of pcbnew_kiface doesn't start until the python
wrapper is generated, which takes ages itself.
- the python wrapper is compiled as one of the last things, and the linker
must wait for that.
We could probably shave off another two or three minutes of build time if
we could make sure that we always make progress on the critical path. The
dependency generation as a side effect pulls all the sources and headers
into cache, which reduces the effects of I/O latency a bit during
compilation, so parallelizing with more than the number of threads you
actually have is probably counterproductive.
Numbers with CPU time as percent of real time:
clean ~15 ~5 tip
E5-2620v4 (32) 7:04.87 5:18.74 5:16.64 3:40.92
2243% 1854% 1854% 1330%
T2P9D01 (64) 5:16.37 4:14.04 4:10.26 3:20.97
3360% 2558% 2570% 1546%