Very Slow Build

I'm having an issue with a VS2013 build.

Building from command line, it takes roughly 3-4 minutes.  Building from TeamCity takes over an hour.  Build log attached.

I'm not sure how to diagnose what the issue is.  Could anyone provide some help?



Attachment(s):
build_log.log.zip
6 comments
Comment actions Permalink

Hi Matthew,

I see the one hour gap between these two lines in build log:

[17:56:44] :           [Step 1/3] ClCompile: [19:06:06] :           [Step 1/3]   C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe

Looks like the build hangs somewhere inside your script, not while performing TeamCity related operations (such as checkout changes or publishing artifacts).
Please see the guideline which should help you to investigate the build slowness.

0
Comment actions Permalink

Hi Alina,

Thanks for your reply.  

Would there be any kind of common reason(s) why the same script/commands are significantly faster when built on the command line?

0
Comment actions Permalink

I think I've made some progress on this.

The relevant original meta-runner looked like:

    <build-runners>

      <runner name="CMake build &quot;all&quot;" type="jetbrains-cmake-build">

        <parameters>

          <param name="teamcity.build.workingDir" value="build" />

          <param name="teamcity.step.mode" value="default" />

          <param name="ui-jetbrains-cmake-build-redirect-stderr" value="true" />

        </parameters>

      </runner>

  </build-runners>

I took the output from the build log for what was actually being executed and made it into simpleRunner.  This seems to solve the hour long hang/delay issue.

   <build-runners>

      <runner name="CMake build &quot;all&quot;" type="simpleRunner">

        <parameters>

          <param name="teamcity.build.workingDir" value="build" />

          <param name="script.content" value="cmake --build . --config Debug" />

          <param name="teamcity.step.mode" value="default" />

          <param name="use.custom.script" value="true" />

        </parameters>

      </runner>

    </build-runners>

Any ideas to why the difference?

0
Comment actions Permalink

Hi Matthew,

I'm not sure about slowness cause, but cmake runner with 'redirect output' mode runs cmake with '2>&1' at the end on script line, so maybe it's related to native output redirection, try build with that option disabled. You can do thin in meta-runner config by changing value of 'ui-jetbrains-cmake-build-redirect-stderr' propery to 'false'.

Anyway you could try running "cmake --build . --config Debug --  2>&1" as command line script (It's equivalent of runner-generated script).

Another possible cause is different environment under cmake runner. Do you have some environment modifications in first step?

To further investigation please attach build logs of command line runner with output redirection and cmake runner without output redirection.

0
Comment actions Permalink

Hi Vladislav,

Thanks for your reply.

Why I try to enter <param name="script.content" value="cmake --build . --config Debug -- 2>&1" /> I get the following error:

Invalid xml. Error on line 11: The entity name must immediately follow the '&' in the entity reference.

0
Comment actions Permalink

Hi Vlad,

I got my original idea from https://github.com/VladRassokhin/CMake-runner-plugin/issues/2

Were you ever able to resolve that issue?  It seems like the same bug that I am experiencing.  

I am using TeamCity 9.0.1 and VS2013

0

Please sign in to leave a comment.