CMake + VS2017 taking extremely long to configure a project

jan's Avatar

jan

31 Jan, 2019 10:41 AM

We are using AppVeyor to do a build involving multiple steps, projects, etc.
This spans multiple CMake configures, msbuild builds and Qt builds.

Previously, we were using VS2013 and everything was done in about 15 minutes total.

Recently, we upgraded to VS2017 (and latest Qt available), but other than that we didn't change anything.
Suddenly, the build takes about 30-40 minutes, more than doubling the build time sometimes.

Checking multiple build logs, the culprit seems to be CMake, of all things.
It takes a whopping six minutes (!!!!!) to configure & generate a project with VS2017. And since this is done multiple times, that explains why the build time blew up so much.
Watching the build log live, one can also see how slow CMake crawls through initialization. Everything else takes about the same time as previously.

We do nothing fancy with CMake, just the usual:
cmake -G "Visual Studio 15 2017 Win64" ...
and
cmake -G "Visual Studio 15 2017" ...

On our own computers, that configure step takes a few seconds, as CMake usually does. Not on AppVeyor, though, for some reason?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 31 Jan, 2019 11:02 PM

    Ilya Finkelshteyn's Avatar

    Hi Jan,

    Is there any way you can provide a simple repro in the public repository so we could investigate? Also what specific versions of CMake and Visual Studio you have on local computers?

    Ilya.

  2. 2 Posted by jan on 01 Feb, 2019 07:14 AM

    jan's Avatar

    The repo in question happens to be public, actually:
    https://github.com/boomtv-admin/obs-plugins

    We check it out as part of our build:

    Write-Host "Cloning plugins repo..."
    git clone https://github.com/boomtv-admin/obs-plugins obs-plugins


    Write-Host "Download and unzip OBS dependencies..." [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" $source = "https://obsproject.com/downloads/dependencies2017.zip" $destinationOBSDeps = "OBS_deps.zip" Invoke-WebRequest $source -OutFile $destinationOBSDeps 7z.exe x $destinationOBSDeps -o"OBSDeps" -y cd OBSDeps $obsDepsFolder = (Get-Item -Path "." -Verbose).FullName cd ..


    Write-Host "Running CMake..." mkdir obs-plugins_build_32 mkdir obs-plugins_build_64 cd obs-plugins_build_32 cmake -G "Visual Studio 15 2017" -D QTDIR:Path=C:\Qt\5.11.2\msvc2015 -D DepsPath:Path=$obsDepsFolder\win32 ..\obs-plugins cd ..\obs-plugins_build_64 cmake -G "Visual Studio 15 2017 Win64" -D QTDIR:Path=C:\Qt\5.11.2\msvc2017_64 -D DepsPath:Path=$obsDepsFolder\win64 ..\obs-plugins cd ..

    Our CMake/VS versions differ. My CMake version is 3.13.2, but others on the team will have other versions.
    The VS version is Visual Studio Community 2017, version 15.9.5.

  3. Support Staff 3 Posted by Owen McDonnell on 06 Feb, 2019 08:31 PM

    Owen McDonnell's Avatar

    Can you please link to the build on AppVeyor to which you are referring.

  4. 4 Posted by jan on 07 Feb, 2019 06:31 AM

    jan's Avatar

    This is one that uses the branch with VS2017:
    https://ci.appveyor.com/project/BoomTV/replay/builds/22106566

    Compare it with this one, which uses VS2013 and which is much faster:
    https://ci.appveyor.com/project/BoomTV/replay/builds/22050111

  5. Support Staff 5 Posted by Ilya Finkelshte... on 13 Feb, 2019 11:57 PM

    Ilya Finkelshteyn's Avatar

    Visual Studio 2013 and Visual Studio 2017 not always run in the same datacenter. Specifically most slow Visual Studio 2017 builds were executed in backup datacenter with VMs on Hyper-V machines which have a little bit slow CPU clock rate.

    We setup your account to never run in that datacenter. From now (assuming no build scenario changes) your Visual Studio 2017 builds will be executed only in the same datacenter where Visual Studio 2013 runs and will take 20-30 minutes, which is better than 30-40, but still not 15.

    We will investigate more to see if we can find a way to make it work as fast as it does on Visual Studio 2013, but we are not sure if this is something which we can control (maybe it is just price we have to pay for latest cmake and VS). Will keep you in touch.

  6. 6 Posted by jan on 14 Feb, 2019 06:50 AM

    jan's Avatar

    Alright, thanks for the update and investigating this.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

21 Aug, 2019 11:06 PM
21 Aug, 2019 02:08 PM
21 Aug, 2019 01:37 PM
21 Aug, 2019 10:21 AM
21 Aug, 2019 09:10 AM

 

21 Aug, 2019 05:56 AM
21 Aug, 2019 03:08 AM
20 Aug, 2019 11:33 PM
20 Aug, 2019 08:07 PM
20 Aug, 2019 05:50 PM
20 Aug, 2019 12:35 PM