We have general git slowness under windows using TeamCity Enterprise 9.1.1 (build 37059) with our builds taking about 5 times longer than on other operating systems. In investigating this I found that a lot of the time in Git is taken up doing submodule init, sync and update --force about 5 times. Technically this should be a no op however I found that if I run the build agent as console instead of service by stopping the service and running it from a dos prompt with this command line:
c:\BuildAgent\launcher\bin\TeamCityAgentService-windows-x86-32.exe -c c:\BuildAgent\launcher\conf\wrapper.conf
It takes about 1 minute instead of 4 minutes which is a significant performance boost.
I noticed that the wrapper version you are using is 3.2.3 and the latest is 3.5.28. I tried replacing the wrapper.jar with the latest from here:
But it looks like part of the wrapper is build into the TeamcityBuildAgent.exe as I get the following version mismatch error:
WARNING - The Wrapper jar file currently in use is version "3.5.28"
INFO | jvm 1 | 2016/03/11 14:28:18 | WrapperManager: while the version of the Wrapper which launched this JVM is
INFO | jvm 1 | 2016/03/11 14:28:18 | WrapperManager: "3.2.3".
INFO | jvm 1 | 2016/03/11 14:28:18 | WrapperManager: The Wrapper may appear to work correctly but some features may
INFO | jvm 1 | 2016/03/11 14:28:18 | WrapperManager: not function correctly. This configuration has not been tested
INFO | jvm 1 | 2016/03/11 14:28:18 | WrapperManager: and is not supported.
Looking at the release notes for wrapper it's possible they've fixed this problem. So wondering if it would be possible to get a matching agent with the latest wrapper code built in. Any other advice for making git faster under windows would be appreciated as well.
One other interesting data point. The performance gains by running as console were maintained until a reboot if the console was run under the same account as the services. So if you log in under the services account, run as console, switch back to run the service the service now runs faster. If you use another account the performance gains go away as soon as you switch back to service.
Thanks a lot.