Cmake configuration and generate is extremely slow for VS 2017

We update our visual studio verion from VS 2012 to VS 2017. We are using Cmake3.18.2. It looks the configuration and generation time in cmake extremely high in VS 2017. In VS 2012 same code its taking around 15 mins, now in VS 2017 the camke configuration and generation taking around 40mins.

Due to introspection checks with e.g. try_compile, the configuration time for a fresh build tree and that for an existing build tree can vary greatly. Please post your times for each of VS 2012 and VS 2017 for both initial configuration and re-configuration.

fresh cmake configuration:
VS 2012-> around 17 mins
VS 2017-> around 40 mins

Is there no such issue reported before?

This is the first I’ve heard of such a problem. The same generator code is used for both versions.

What are the reconfiguration times?

Since you are using cmake 3.18 why not use the profiler to try and narrow it down. (Post the results if you can)

A specific example of using Cmake profiler:

cmake -B build --profiling-output=perf.json --profiling-format=google-trace

then type in Chrome or Edge address bar about:tracing and Load perf.json.

Its Created around 3gb size of file. In Chorme/Edge about:tracing its not able to load the file. Any other json reader there to load the file?

You might be able to use the backing project directly. I’ve used it before, but it can be tricky to use.