[CMake] Performance issues on very large project

Patrick Boettcher patrick.boettcher at posteo.de
Wed Apr 6 02:54:00 EDT 2016


Hi,

On Tue, 5 Apr 2016 23:18:41 -0500
Steven Stallion <sstallion at gmail.com> wrote:

> All,
> 
> I am currently working on a very large project that contains over 500
> (yes, really) listfiles. A co-worker was looking into some performance
> issues we were seeing during configuration and found something very
> interesting. Currently configuration is taking 1m57s across several
> configurations using Mac OS X as a host and the latest .dmg from
> cmake.org (3.5.1).
> 
> We have a core module that provides a number of helper functions and
> macros (completely stateless) that is included by most of this
> listfiles (nearly 400 of them). We found that an include guard was
> missing, after adding that configuration now clocks in at 1m30s.
> 
> Taking things a step further, we removed includes of the module, and
> simply included it once in the top-level listfile. Configuration then
> dropped to about 55s.
> 
> The results above seem to indicate a possible file I/O bottleneck.
> This is very surprising to me - these builds are being run on recent
> core-i7's with SSDs. Is anyone else on the list dealing with large
> projects or similar configuration issues?

LLVM/Clang is using ~330 CMakeLists.txt - I never noticed the
config-step to be a bottleneck (cmake ../llvm takes 10 seconds on my
system). But LLVM/Clang is not including a lot of Modules.

real    0m10.551s
user    0m6.696s
sys     0m1.576s

Maybe it is more a question of LOC of than the number of files.

regards,
--
Patrick.


More information about the CMake mailing list