Skip to content

GitVersion newer than v3.4.1 has severe performance problems #1066

Closed

Description

@roryprimrose

We use GitVersionTask (3.6.3) on all the projects in a solution to ensure that all deployed assemblies reflect the correct version from a build (local or build agent). Something has happened in our git branching whereby GitVersionTask for a project has now gone from ~10 seconds to run WriteVersionInfoToBuildLog, UpdateAssemblyInfo and GetVersion to ~60 seconds.

This is a big issue for us because there a 16 projects in the solution that use GitVersionTask. Our overall build time has just jumped from 8 minutes to 18-24 minutes.

Is it possible for GitVersionTask to cache the calculation of version metadata and share this between the projects being built? Re-calculating the same information on each project build is very expensive.

Activity

  1. discomurray commented on Oct 12, 2016

    @discomurray

    If you roll back to GitVersion 3.4.1 does the performance improve?

  2. roryprimrose commented on Oct 12, 2016

    @roryprimrose
    Author

    3.6.3 ran for 24.2 minutes
    3.4.1 ran for 8.6 minutes

  3. roryprimrose commented on Oct 12, 2016

    @roryprimrose
    Author

    Should we be rolling back to 3.4.1?

  4. asbjornu commented on Oct 13, 2016

    @asbjornu
    Member

    @roryprimrose: If you don't need any of the features or bug fixes implemented by 3.4.1+, then by all means downgrade until we figure this one out. 😃

    Caching has been a repeated issue, but usually the other way around since we implemented it in #737; people have complained about the cache being too eager and not being able to invalidate it. So a lot of stuff has happened around cache invalidation lately that I guess affects you in unexpected ways.

    If you have a look at this search for "cache", you can see that there has been done a lot of stuff related to caching, so any one of those pull requests can be the source of your troubles.

    The diff between 3.4.1 and 3.6.3 is too big to list on GitHub, so I guess wading through the swathes of commits is going to be too much work, but the source of your problems is hidden in there somewhere. 😄

  5. roryprimrose commented on Oct 14, 2016

    @roryprimrose
    Author

    I've been able to narrow it down a little. I've incrementally updated each version and pushed builds. The build against 3.5.4 took 10 minutes. Updating to 3.6.0 took 24 minutes.

    The following is a view of the GitVersionTask executing for just one of the projects in the solution. The execution time goes from 14 seconds to 57 seconds.

    3.5.4

    2016-10-13T23:44:49.5597356Z WriteVersionInfoToBuildLog:
    2016-10-13T23:44:49.5753613Z   INFO [10/14/16 10:44:49:55] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:44:49.6066300Z   INFO [10/14/16 10:44:49:60] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:44:49.6847461Z   INFO [10/14/16 10:44:49:68] Begin: Loading version variables from disk cache
    2016-10-13T23:44:49.7161194Z     INFO [10/14/16 10:44:49:71] Cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\FD22870349EE0ACCD405C828C070B6825088FBF4.yml not found.
    2016-10-13T23:44:49.7161194Z   INFO [10/14/16 10:44:49:71] End: Loading version variables from disk cache (Took: 31.37ms)
    2016-10-13T23:44:49.7161194Z   INFO [10/14/16 10:44:49:71] Branch from build environment: refs/heads/feature-performancetesting
    2016-10-13T23:45:05.5298362Z   INFO [10/14/16 10:45:05:52] Using latest commit on specified branch
    2016-10-13T23:45:05.5453828Z   INFO [10/14/16 10:45:05:54] Begin: Attempting to inherit branch configuration from parent branch
    2016-10-13T23:45:05.6703804Z     INFO [10/14/16 10:45:05:67] Begin: Finding branch source
    2016-10-13T23:45:05.7485203Z       INFO [10/14/16 10:45:05:74] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop
    2016-10-13T23:45:05.7641515Z         INFO [10/14/16 10:45:05:76] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:45:05.7641515Z       INFO [10/14/16 10:45:05:76] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop (Took: 15.63ms)
    2016-10-13T23:45:05.7641515Z       INFO [10/14/16 10:45:05:76] Begin: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration
    2016-10-13T23:45:05.7641515Z         INFO [10/14/16 10:45:05:76] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:45:05.7641515Z       INFO [10/14/16 10:45:05:76] End: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration (Took: 0.00ms)
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master (Took: 0.00ms)
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] Begin: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] End: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2 (Took: 0.00ms)
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3 (Took: 0.00ms)
    2016-10-13T23:45:05.7797741Z       INFO [10/14/16 10:45:05:77] Begin: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page
    2016-10-13T23:45:05.7954000Z         INFO [10/14/16 10:45:05:79] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:45:05.7954000Z       INFO [10/14/16 10:45:05:79] End: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page (Took: 15.63ms)
    2016-10-13T23:45:05.7954000Z       INFO [10/14/16 10:45:05:79] Begin: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config
    2016-10-13T23:45:05.7954000Z       INFO [10/14/16 10:45:05:79] End: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config (Took: 0.00ms)
    2016-10-13T23:45:05.7954000Z       INFO [10/14/16 10:45:05:79] Begin: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-SupportWeb-fix
    2016-10-13T23:45:05.7954000Z         INFO [10/14/16 10:45:05:79] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:45:05.8110289Z       INFO [10/14/16 10:45:05:81] End: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-SupportWeb-fix (Took: 15.63ms)
    2016-10-13T23:45:05.8110289Z     INFO [10/14/16 10:45:05:81] End: Finding branch source (Took: 140.65ms)
    2016-10-13T23:45:05.8266558Z     INFO [10/14/16 10:45:05:82] Found possible parent branches: master
    2016-10-13T23:45:05.8266558Z   INFO [10/14/16 10:45:05:82] End: Attempting to inherit branch configuration from parent branch (Took: 281.27ms)
    2016-10-13T23:45:05.8580002Z   INFO [10/14/16 10:45:05:85] Running against branch: feature-performancetesting (56b89f48126009e01f03b7498202d95a4a141b97)
    2016-10-13T23:45:05.8580002Z   INFO [10/14/16 10:45:05:85] Begin: Calculating base versions
    2016-10-13T23:45:05.9360365Z     INFO [10/14/16 10:45:05:93] Fallback base version: 0.1.0 with commit count source 93e085d56ea404f2d661fc6b97f9efc0f62b2fac
    2016-10-13T23:45:06.0766635Z     INFO [10/14/16 10:45:06:07] Git tag 'v2.2.9': 2.2.9 with commit count source ca082ef924166f5a04ffeb19e7d54a047cc36ecf
    2016-10-13T23:45:06.0922968Z     INFO [10/14/16 10:45:06:09] Git tag 'v2.2.8': 2.2.8 with commit count source 7a0e0b158886edd3b22eefdb1fb9f77026521cb7
    2016-10-13T23:45:06.1079203Z     INFO [10/14/16 10:45:06:10] Git tag 'v2.2.7': 2.2.7 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:45:06.1704206Z     INFO [10/14/16 10:45:06:17] Merge message 'Merge database projects from release-2.2': 2.2.0 with commit count source b19f109c10450c3de48e19b33f14c0990a2c51cc
    2016-10-13T23:45:06.1860598Z     INFO [10/14/16 10:45:06:18] Merge message 'Merge branch 'release-2.2'': 2.2.0 with commit count source a7f838407b69a8887e08fa7dc185290cb2781277
    2016-10-13T23:45:06.2016791Z     INFO [10/14/16 10:45:06:20] Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 4fea2d180fe94864945c349f43c72b6264429e2f
    2016-10-13T23:45:06.2173041Z     INFO [10/14/16 10:45:06:21] Found multiple base versions which will produce the same SemVer (2.3.0), taking oldest source for commit counting (Git tag 'v2.2.7')
    2016-10-13T23:45:06.2173041Z     INFO [10/14/16 10:45:06:21] Base version used: Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:45:06.2329271Z   INFO [10/14/16 10:45:06:21] End: Calculating base versions (Took: 359.30ms)
    2016-10-13T23:45:06.2329271Z   INFO [10/14/16 10:45:06:23] Using branch name to calculate version tag
    2016-10-13T23:45:06.2798968Z   INFO [10/14/16 10:45:06:27] 37 commits found between 1e2487b3181bc82e7e55fd0311971146c21d21c6 and 56b89f48126009e01f03b7498202d95a4a141b97
    2016-10-13T23:45:06.3111413Z   INFO [10/14/16 10:45:06:31] Begin: Creating dictionary
    2016-10-13T23:45:06.3111413Z   INFO [10/14/16 10:45:06:31] End: Creating dictionary (Took: 0.00ms)
    2016-10-13T23:45:06.3111413Z   INFO [10/14/16 10:45:06:31] Begin: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml
    2016-10-13T23:45:06.3580255Z   INFO [10/14/16 10:45:06:35] End: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml (Took: 46.88ms)
    2016-10-13T23:45:06.3580255Z   INFO [10/14/16 10:45:06:35] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:45:06.3580255Z   Executing GenerateSetVersionMessage for 'VsoAgent'.
    2016-10-13T23:45:09.7019490Z   Executing GenerateBuildLogOutput for 'VsoAgent'.
    2016-10-13T23:45:09.7019490Z UpdateAssemblyInfo:
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:37] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:37] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:38] Begin: Loading version variables from disk cache
    2016-10-13T23:45:09.7019490Z     INFO [10/14/16 10:45:06:40] Begin: Deserializing version variables from cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml
    2016-10-13T23:45:09.7019490Z     INFO [10/14/16 10:45:06:40] End: Deserializing version variables from cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml (Took: 0.00ms)
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:40] End: Loading version variables from disk cache (Took: 15.63ms)
    2016-10-13T23:45:09.7019490Z GetVersion:
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:42] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:42] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:43] Begin: Loading version variables from disk cache
    2016-10-13T23:45:09.7019490Z     INFO [10/14/16 10:45:06:45] Begin: Deserializing version variables from cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml
    2016-10-13T23:45:09.7019490Z     INFO [10/14/16 10:45:06:45] End: Deserializing version variables from cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\EDAE63ED385E74D4D5C3E116927DAA9B12CEC761.yml (Took: 0.00ms)
    2016-10-13T23:45:09.7019490Z   INFO [10/14/16 10:45:06:45] End: Loading version variables from disk cache (Took: 15.62ms)
    2016-10-13T23:45:09.7019490Z CoreCompile:
    

    3.6.0

    2016-10-13T23:55:05.6395217Z WriteVersionInfoToBuildLog:
    2016-10-13T23:55:05.6395217Z   INFO [10/14/16 10:55:05:63] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:55:05.6395217Z   INFO [10/14/16 10:55:05:63] Branch from build environment: refs/heads/feature-performancetesting
    2016-10-13T23:55:20.5781979Z   INFO [10/14/16 10:55:20:57] IsDynamicGitRepository: False
    2016-10-13T23:55:20.5781979Z   INFO [10/14/16 10:55:20:57] Returning Project Root from DotGitDirectory: C:\B\PRODUCT_NAME\_work\8\s\.git - C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:55:20.5781979Z   INFO [10/14/16 10:55:20:57] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:55:20.5781979Z   INFO [10/14/16 10:55:20:57] DotGit directory is: C:\B\PRODUCT_NAME\_work\8\s\.git
    2016-10-13T23:55:20.5938386Z   INFO [10/14/16 10:55:20:59] Begin: Loading version variables from disk cache
    2016-10-13T23:55:20.6407025Z     INFO [10/14/16 10:55:20:64] Cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\1AD0D41E308A613D603A317EF4AF968DC58DF853.yml not found.
    2016-10-13T23:55:20.6407025Z   INFO [10/14/16 10:55:20:64] End: Loading version variables from disk cache (Took: 46.86ms)
    2016-10-13T23:55:20.7657127Z   INFO [10/14/16 10:55:20:76] Using latest commit on specified branch
    2016-10-13T23:55:20.7813664Z   INFO [10/14/16 10:55:20:78] Begin: Attempting to inherit branch configuration from parent branch
    2016-10-13T23:55:20.8907232Z     INFO [10/14/16 10:55:20:89] Begin: Finding branch source
    2016-10-13T23:55:21.0001056Z       INFO [10/14/16 10:55:21:00] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop
    2016-10-13T23:55:21.0157433Z         INFO [10/14/16 10:55:21:01] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:21.0157433Z       INFO [10/14/16 10:55:21:01] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop (Took: 15.64ms)
    2016-10-13T23:55:21.0626103Z       INFO [10/14/16 10:55:21:06] Begin: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration
    2016-10-13T23:55:21.0626103Z         INFO [10/14/16 10:55:21:06] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:21.0626103Z       INFO [10/14/16 10:55:21:06] End: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration (Took: 0.00ms)
    2016-10-13T23:55:21.0626103Z       INFO [10/14/16 10:55:21:06] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master
    2016-10-13T23:55:21.0626103Z       INFO [10/14/16 10:55:21:06] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master (Took: 0.00ms)
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:06] Begin: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:07] End: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2 (Took: 15.64ms)
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:07] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:07] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3 (Took: 0.00ms)
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:07] Begin: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page
    2016-10-13T23:55:21.0782503Z         INFO [10/14/16 10:55:21:07] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:21.0782503Z       INFO [10/14/16 10:55:21:07] End: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page (Took: 0.00ms)
    2016-10-13T23:55:21.0938629Z       INFO [10/14/16 10:55:21:07] Begin: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config
    2016-10-13T23:55:21.0938629Z       INFO [10/14/16 10:55:21:09] End: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config (Took: 15.61ms)
    2016-10-13T23:55:21.0938629Z       INFO [10/14/16 10:55:21:09] Begin: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix
    2016-10-13T23:55:21.0938629Z         INFO [10/14/16 10:55:21:09] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:21.0938629Z       INFO [10/14/16 10:55:21:09] End: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix (Took: 0.00ms)
    2016-10-13T23:55:21.1095029Z     INFO [10/14/16 10:55:21:10] End: Finding branch source (Took: 218.78ms)
    2016-10-13T23:55:21.1095029Z     INFO [10/14/16 10:55:21:10] Begin: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'.
    2016-10-13T23:55:21.1095029Z       INFO [10/14/16 10:55:21:10] Trying to find direct branches.
    2016-10-13T23:55:21.1251264Z       INFO [10/14/16 10:55:21:12] Direct branch found: 'master'.
    2016-10-13T23:55:21.1251264Z     INFO [10/14/16 10:55:21:12] End: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'. (Took: 15.62ms)
    2016-10-13T23:55:21.1251264Z     INFO [10/14/16 10:55:21:12] Found possible parent branches: master
    2016-10-13T23:55:21.1251264Z   INFO [10/14/16 10:55:21:12] End: Attempting to inherit branch configuration from parent branch (Took: 343.76ms)
    2016-10-13T23:55:21.1407538Z   INFO [10/14/16 10:55:21:14] Running against branch: feature-performancetesting (4d2cd258d5237c55a30b92e67f5d40e1ff5553fa)
    2016-10-13T23:55:21.1563851Z   INFO [10/14/16 10:55:21:15] Begin: Calculating base versions
    2016-10-13T23:55:21.2344995Z     INFO [10/14/16 10:55:21:23] Fallback base version: 0.1.0 with commit count source 93e085d56ea404f2d661fc6b97f9efc0f62b2fac
    2016-10-13T23:55:21.4063881Z     INFO [10/14/16 10:55:21:40] Git tag 'v2.2.9': 2.2.9 with commit count source ca082ef924166f5a04ffeb19e7d54a047cc36ecf
    2016-10-13T23:55:21.4220207Z     INFO [10/14/16 10:55:21:42] Git tag 'v2.2.8': 2.2.8 with commit count source 7a0e0b158886edd3b22eefdb1fb9f77026521cb7
    2016-10-13T23:55:21.4376467Z     INFO [10/14/16 10:55:21:43] Git tag 'v2.2.7': 2.2.7 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:55:21.5001656Z     INFO [10/14/16 10:55:21:50] Merge message 'Merge database projects from release-2.2': 2.2.0 with commit count source b19f109c10450c3de48e19b33f14c0990a2c51cc
    2016-10-13T23:55:21.5157771Z     INFO [10/14/16 10:55:21:51] Merge message 'Merge branch 'release-2.2'': 2.2.0 with commit count source a7f838407b69a8887e08fa7dc185290cb2781277
    2016-10-13T23:55:21.5314060Z     INFO [10/14/16 10:55:21:53] Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 4fea2d180fe94864945c349f43c72b6264429e2f
    2016-10-13T23:55:21.5470304Z     INFO [10/14/16 10:55:21:54] Found multiple base versions which will produce the same SemVer (2.3.0), taking oldest source for commit counting (Git tag 'v2.2.7')
    2016-10-13T23:55:21.5470304Z     INFO [10/14/16 10:55:21:54] Base version used: Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:55:21.5470304Z   INFO [10/14/16 10:55:21:54] End: Calculating base versions (Took: 390.65ms)
    2016-10-13T23:55:21.5626591Z   INFO [10/14/16 10:55:21:56] Using branch name to calculate version tag
    2016-10-13T23:55:21.6096363Z   INFO [10/14/16 10:55:21:60] 38 commits found between 1e2487b3181bc82e7e55fd0311971146c21d21c6 and 4d2cd258d5237c55a30b92e67f5d40e1ff5553fa
    2016-10-13T23:55:21.6251646Z   INFO [10/14/16 10:55:21:62] Begin: Creating dictionary
    2016-10-13T23:55:21.6408723Z   INFO [10/14/16 10:55:21:64] End: Creating dictionary (Took: 15.71ms)
    2016-10-13T23:55:21.6408723Z   INFO [10/14/16 10:55:21:64] Begin: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\1AD0D41E308A613D603A317EF4AF968DC58DF853.yml
    2016-10-13T23:55:21.6877153Z   INFO [10/14/16 10:55:21:68] End: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\1AD0D41E308A613D603A317EF4AF968DC58DF853.yml (Took: 46.84ms)
    2016-10-13T23:55:21.7032956Z   INFO [10/14/16 10:55:21:70] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:55:21.7032956Z   Executing GenerateSetVersionMessage for 'VsoAgent'.
    2016-10-13T23:55:23.7659490Z   Executing GenerateBuildLogOutput for 'VsoAgent'.
    2016-10-13T23:55:23.7659490Z UpdateAssemblyInfo:
    2016-10-13T23:55:23.7659490Z   INFO [10/14/16 10:55:21:71] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:55:23.7659490Z   INFO [10/14/16 10:55:21:71] Branch from build environment: refs/heads/feature-performancetesting
    2016-10-13T23:55:41.1735712Z   INFO [10/14/16 10:55:41:17] IsDynamicGitRepository: False
    2016-10-13T23:55:41.1735712Z   INFO [10/14/16 10:55:41:17] Returning Project Root from DotGitDirectory: C:\B\PRODUCT_NAME\_work\8\s\.git - C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:55:41.1735712Z   INFO [10/14/16 10:55:41:17] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:55:41.1735712Z   INFO [10/14/16 10:55:41:17] DotGit directory is: C:\B\PRODUCT_NAME\_work\8\s\.git
    2016-10-13T23:55:41.1892137Z   INFO [10/14/16 10:55:41:18] Begin: Loading version variables from disk cache
    2016-10-13T23:55:41.2048305Z     INFO [10/14/16 10:55:41:20] Cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\A16C59AF972CF9FDB836687A1ABB281B4442B77E.yml not found.
    2016-10-13T23:55:41.2048305Z   INFO [10/14/16 10:55:41:20] End: Loading version variables from disk cache (Took: 15.62ms)
    2016-10-13T23:55:41.2048305Z   INFO [10/14/16 10:55:41:20] Using latest commit on specified branch
    2016-10-13T23:55:41.2048305Z   INFO [10/14/16 10:55:41:20] Begin: Attempting to inherit branch configuration from parent branch
    2016-10-13T23:55:41.3142077Z     INFO [10/14/16 10:55:41:31] Begin: Finding branch source
    2016-10-13T23:55:41.4235993Z       INFO [10/14/16 10:55:41:42] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop
    2016-10-13T23:55:41.4235993Z         INFO [10/14/16 10:55:41:42] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:41.4235993Z       INFO [10/14/16 10:55:41:42] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop (Took: 0.00ms)
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] Begin: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration
    2016-10-13T23:55:41.4704691Z         INFO [10/14/16 10:55:41:47] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] End: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration (Took: 0.00ms)
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master (Took: 0.00ms)
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] Begin: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2
    2016-10-13T23:55:41.4704691Z       INFO [10/14/16 10:55:41:47] End: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2 (Took: 0.00ms)
    2016-10-13T23:55:41.4861061Z       INFO [10/14/16 10:55:41:48] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3
    2016-10-13T23:55:41.4861061Z       INFO [10/14/16 10:55:41:48] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3 (Took: 0.00ms)
    2016-10-13T23:55:41.4861061Z       INFO [10/14/16 10:55:41:48] Begin: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page
    2016-10-13T23:55:41.4861061Z         INFO [10/14/16 10:55:41:48] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:41.4861061Z       INFO [10/14/16 10:55:41:48] End: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page (Took: 0.00ms)
    2016-10-13T23:55:41.4861061Z       INFO [10/14/16 10:55:41:48] Begin: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config
    2016-10-13T23:55:41.5017251Z       INFO [10/14/16 10:55:41:48] End: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config (Took: 0.00ms)
    2016-10-13T23:55:41.5017251Z       INFO [10/14/16 10:55:41:50] Begin: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix
    2016-10-13T23:55:41.5017251Z         INFO [10/14/16 10:55:41:50] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:55:41.5017251Z       INFO [10/14/16 10:55:41:50] End: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix (Took: 0.00ms)
    2016-10-13T23:55:41.5017251Z     INFO [10/14/16 10:55:41:50] End: Finding branch source (Took: 187.52ms)
    2016-10-13T23:55:41.5017251Z     INFO [10/14/16 10:55:41:50] Begin: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'.
    2016-10-13T23:55:41.5017251Z       INFO [10/14/16 10:55:41:50] Trying to find direct branches.
    2016-10-13T23:55:41.5173473Z       INFO [10/14/16 10:55:41:50] Direct branch found: 'master'.
    2016-10-13T23:55:41.5173473Z     INFO [10/14/16 10:55:41:51] End: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'. (Took: 15.62ms)
    2016-10-13T23:55:41.5173473Z     INFO [10/14/16 10:55:41:51] Found possible parent branches: master
    2016-10-13T23:55:41.5173473Z   INFO [10/14/16 10:55:41:51] End: Attempting to inherit branch configuration from parent branch (Took: 312.52ms)
    2016-10-13T23:55:41.5330799Z   INFO [10/14/16 10:55:41:53] Running against branch: feature-performancetesting (4d2cd258d5237c55a30b92e67f5d40e1ff5553fa)
    2016-10-13T23:55:41.5330799Z   INFO [10/14/16 10:55:41:53] Begin: Calculating base versions
    2016-10-13T23:55:41.5954929Z     INFO [10/14/16 10:55:41:59] Fallback base version: 0.1.0 with commit count source 93e085d56ea404f2d661fc6b97f9efc0f62b2fac
    2016-10-13T23:55:41.6423969Z     INFO [10/14/16 10:55:41:64] Git tag 'v2.2.9': 2.2.9 with commit count source ca082ef924166f5a04ffeb19e7d54a047cc36ecf
    2016-10-13T23:55:41.6579915Z     INFO [10/14/16 10:55:41:65] Git tag 'v2.2.8': 2.2.8 with commit count source 7a0e0b158886edd3b22eefdb1fb9f77026521cb7
    2016-10-13T23:55:41.6737473Z     INFO [10/14/16 10:55:41:67] Git tag 'v2.2.7': 2.2.7 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:55:41.7362193Z     INFO [10/14/16 10:55:41:73] Merge message 'Merge database projects from release-2.2': 2.2.0 with commit count source b19f109c10450c3de48e19b33f14c0990a2c51cc
    2016-10-13T23:55:41.7362193Z     INFO [10/14/16 10:55:41:73] Merge message 'Merge branch 'release-2.2'': 2.2.0 with commit count source a7f838407b69a8887e08fa7dc185290cb2781277
    2016-10-13T23:55:41.7673823Z     INFO [10/14/16 10:55:41:76] Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 4fea2d180fe94864945c349f43c72b6264429e2f
    2016-10-13T23:55:41.7829997Z     INFO [10/14/16 10:55:41:78] Found multiple base versions which will produce the same SemVer (2.3.0), taking oldest source for commit counting (Git tag 'v2.2.7')
    2016-10-13T23:55:41.7829997Z     INFO [10/14/16 10:55:41:78] Base version used: Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:55:41.7829997Z   INFO [10/14/16 10:55:41:78] End: Calculating base versions (Took: 249.92ms)
    2016-10-13T23:55:41.7986180Z   INFO [10/14/16 10:55:41:78] Using branch name to calculate version tag
    2016-10-13T23:55:41.8299681Z   INFO [10/14/16 10:55:41:82] 38 commits found between 1e2487b3181bc82e7e55fd0311971146c21d21c6 and 4d2cd258d5237c55a30b92e67f5d40e1ff5553fa
    2016-10-13T23:55:41.8299681Z   INFO [10/14/16 10:55:41:82] Begin: Creating dictionary
    2016-10-13T23:55:41.8454977Z   INFO [10/14/16 10:55:41:82] End: Creating dictionary (Took: 0.00ms)
    2016-10-13T23:55:41.8454977Z   INFO [10/14/16 10:55:41:82] Begin: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\A16C59AF972CF9FDB836687A1ABB281B4442B77E.yml
    2016-10-13T23:55:41.8454977Z   INFO [10/14/16 10:55:41:84] End: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\A16C59AF972CF9FDB836687A1ABB281B4442B77E.yml (Took: 15.53ms)
    2016-10-13T23:55:41.8454977Z GetVersion:
    2016-10-13T23:55:41.8611255Z   INFO [10/14/16 10:55:41:84] Applicable build agent found: 'VsoAgent'.
    2016-10-13T23:55:41.8611255Z   INFO [10/14/16 10:55:41:84] Branch from build environment: refs/heads/feature-performancetesting
    2016-10-13T23:56:01.3157913Z   INFO [10/14/16 10:56:01:31] IsDynamicGitRepository: False
    2016-10-13T23:56:01.3157913Z   INFO [10/14/16 10:56:01:31] Returning Project Root from DotGitDirectory: C:\B\PRODUCT_NAME\_work\8\s\.git - C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:56:01.3314095Z   INFO [10/14/16 10:56:01:31] Project root is: C:\B\PRODUCT_NAME\_work\8\s
    2016-10-13T23:56:01.3314095Z   INFO [10/14/16 10:56:01:31] DotGit directory is: C:\B\PRODUCT_NAME\_work\8\s\.git
    2016-10-13T23:56:01.3470352Z   INFO [10/14/16 10:56:01:33] Begin: Loading version variables from disk cache
    2016-10-13T23:56:01.3470352Z     INFO [10/14/16 10:56:01:34] Cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\3E9C61DCBB9FCF5BEBBDC5933796A9A5E3ED7398.yml not found.
    2016-10-13T23:56:01.3470352Z   INFO [10/14/16 10:56:01:34] End: Loading version variables from disk cache (Took: 15.63ms)
    2016-10-13T23:56:01.3626624Z   INFO [10/14/16 10:56:01:36] Using latest commit on specified branch
    2016-10-13T23:56:01.3626624Z   INFO [10/14/16 10:56:01:36] Begin: Attempting to inherit branch configuration from parent branch
    2016-10-13T23:56:01.4564184Z     INFO [10/14/16 10:56:01:45] Begin: Finding branch source
    2016-10-13T23:56:01.5502446Z       INFO [10/14/16 10:56:01:55] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop
    2016-10-13T23:56:01.5659035Z         INFO [10/14/16 10:56:01:56] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:56:01.5659035Z       INFO [10/14/16 10:56:01:56] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against develop (Took: 15.66ms)
    2016-10-13T23:56:01.5970544Z       INFO [10/14/16 10:56:01:59] Begin: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration
    2016-10-13T23:56:01.5970544Z         INFO [10/14/16 10:56:01:59] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:56:01.5970544Z       INFO [10/14/16 10:56:01:59] End: Found merge base of ca082ef924166f5a04ffeb19e7d54a047cc36ecf against hotfix-database2.2.8migration (Took: 0.00ms)
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:59] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against master (Took: 15.63ms)
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] Begin: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] End: Found merge base of 7b67ca46208976a94417bee52f9dfa54aa45f315 against release-2.2 (Took: 0.00ms)
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] Begin: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] End: Found merge base of c376c2695400eb1a258bf09292bc23f7dd000748 against release-2.3 (Took: 0.00ms)
    2016-10-13T23:56:01.6126808Z       INFO [10/14/16 10:56:01:61] Begin: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page
    2016-10-13T23:56:01.6283184Z         INFO [10/14/16 10:56:01:62] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:56:01.6283184Z       INFO [10/14/16 10:56:01:62] End: Found merge base of 7a0e0b158886edd3b22eefdb1fb9f77026521cb7 against hotfix-2.2-summary-page (Took: 15.64ms)
    2016-10-13T23:56:01.6283184Z       INFO [10/14/16 10:56:01:62] Begin: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config
    2016-10-13T23:56:01.6283184Z       INFO [10/14/16 10:56:01:62] End: Found merge base of b06ab05566ec3e46305d06b95aeabf9a53fa6086 against hotfix-bug2654-web.config (Took: 0.00ms)
    2016-10-13T23:56:01.6283184Z       INFO [10/14/16 10:56:01:62] Begin: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix
    2016-10-13T23:56:01.6283184Z         INFO [10/14/16 10:56:01:62] Merge base was due to a forward merge, moving to next merge base
    2016-10-13T23:56:01.6283184Z       INFO [10/14/16 10:56:01:62] End: Found merge base of 1e2487b3181bc82e7e55fd0311971146c21d21c6 against hotfix-supportweb-fix (Took: 0.00ms)
    2016-10-13T23:56:01.6439444Z     INFO [10/14/16 10:56:01:64] End: Finding branch source (Took: 187.53ms)
    2016-10-13T23:56:01.6439444Z     INFO [10/14/16 10:56:01:64] Begin: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'.
    2016-10-13T23:56:01.6439444Z       INFO [10/14/16 10:56:01:64] Trying to find direct branches.
    2016-10-13T23:56:01.6439444Z       INFO [10/14/16 10:56:01:64] Direct branch found: 'master'.
    2016-10-13T23:56:01.6439444Z     INFO [10/14/16 10:56:01:64] End: Getting branches containing the commit 'c376c2695400eb1a258bf09292bc23f7dd000748'. (Took: 0.00ms)
    2016-10-13T23:56:01.6439444Z     INFO [10/14/16 10:56:01:64] Found possible parent branches: master
    2016-10-13T23:56:01.6439444Z   INFO [10/14/16 10:56:01:64] End: Attempting to inherit branch configuration from parent branch (Took: 281.28ms)
    2016-10-13T23:56:01.6595856Z   INFO [10/14/16 10:56:01:65] Running against branch: feature-performancetesting (4d2cd258d5237c55a30b92e67f5d40e1ff5553fa)
    2016-10-13T23:56:01.6595856Z   INFO [10/14/16 10:56:01:65] Begin: Calculating base versions
    2016-10-13T23:56:01.7376914Z     INFO [10/14/16 10:56:01:73] Fallback base version: 0.1.0 with commit count source 93e085d56ea404f2d661fc6b97f9efc0f62b2fac
    2016-10-13T23:56:01.7846002Z     INFO [10/14/16 10:56:01:78] Git tag 'v2.2.9': 2.2.9 with commit count source ca082ef924166f5a04ffeb19e7d54a047cc36ecf
    2016-10-13T23:56:01.8002068Z     INFO [10/14/16 10:56:01:80] Git tag 'v2.2.8': 2.2.8 with commit count source 7a0e0b158886edd3b22eefdb1fb9f77026521cb7
    2016-10-13T23:56:01.8158339Z     INFO [10/14/16 10:56:01:81] Git tag 'v2.2.7': 2.2.7 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:56:01.8783265Z     INFO [10/14/16 10:56:01:87] Merge message 'Merge database projects from release-2.2': 2.2.0 with commit count source b19f109c10450c3de48e19b33f14c0990a2c51cc
    2016-10-13T23:56:01.8940315Z     INFO [10/14/16 10:56:01:89] Merge message 'Merge branch 'release-2.2'': 2.2.0 with commit count source a7f838407b69a8887e08fa7dc185290cb2781277
    2016-10-13T23:56:01.9095893Z     INFO [10/14/16 10:56:01:90] Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 4fea2d180fe94864945c349f43c72b6264429e2f
    2016-10-13T23:56:01.9252059Z     INFO [10/14/16 10:56:01:90] Found multiple base versions which will produce the same SemVer (2.3.0), taking oldest source for commit counting (Git tag 'v2.2.7')
    2016-10-13T23:56:01.9252059Z     INFO [10/14/16 10:56:01:90] Base version used: Merge message 'Merge from release-2.2 v2.2.8 SupportWeb fix': 2.2.0 with commit count source 1e2487b3181bc82e7e55fd0311971146c21d21c6
    2016-10-13T23:56:01.9252059Z   INFO [10/14/16 10:56:01:90] End: Calculating base versions (Took: 250.00ms)
    2016-10-13T23:56:01.9252059Z   INFO [10/14/16 10:56:01:92] Using branch name to calculate version tag
    2016-10-13T23:56:01.9721358Z   INFO [10/14/16 10:56:01:97] 38 commits found between 1e2487b3181bc82e7e55fd0311971146c21d21c6 and 4d2cd258d5237c55a30b92e67f5d40e1ff5553fa
    2016-10-13T23:56:01.9721358Z   INFO [10/14/16 10:56:01:97] Begin: Creating dictionary
    2016-10-13T23:56:01.9721358Z   INFO [10/14/16 10:56:01:97] End: Creating dictionary (Took: 0.00ms)
    2016-10-13T23:56:01.9721358Z   INFO [10/14/16 10:56:01:97] Begin: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\3E9C61DCBB9FCF5BEBBDC5933796A9A5E3ED7398.yml
    2016-10-13T23:56:01.9721358Z   INFO [10/14/16 10:56:01:97] End: Storing version variables to cache file C:\B\PRODUCT_NAME\_work\8\s\.git\gitversion_cache\3E9C61DCBB9FCF5BEBBDC5933796A9A5E3ED7398.yml (Took: 0.00ms)
    2016-10-13T23:56:02.0345976Z CoreCompile:
    
  6. roryprimrose commented on Oct 14, 2016

    @roryprimrose
    Author

    I've tested some additional versions. 3.6.0, 3.6.1, 3.6.2 and 3.6.4 all have this performance issue. I didn't test 3.6.3 as there seemed to be little point.

  7. discomurray commented on Oct 14, 2016

    @discomurray

    The reasoned I specifically mention 3.4.1 is that I thought the following versions have a dependency on a version of libgit2sharp has has some slow debugging code, and wasn't sure if the issues you were having was related to that or an actual caching issue.

    Since 3.5.4 is performing similar, maybe the dependency was introduced then.

    The current support branch has an update to use the latest libgit2sharp package without the debug code.

  8. changed the title [-]Cache GitVersionTask outcome for re-use[/-] [+]GitVersion newer than v3.4.1 has severe performance problems[/+] on Oct 14, 2016
  9. asbjornu commented on Oct 14, 2016

    @asbjornu
    Member

    @discomurray: What slow debugging code are you referring to? If that's indeed the case, you might be on to something.

  10. discomurray commented on Oct 15, 2016

    @discomurray

    see this issue in libgit2sharp libgit2/libgit2sharp#1368

  11. asbjornu commented on Oct 17, 2016

    @asbjornu
    Member

    @discomurray: Ah, thanks for the pointer. Is it worth hoping that @mkoertgen's work in #1024 might help on the performance issue (as well), then?

  12. mkoertgen commented on Oct 17, 2016

    @mkoertgen
    Contributor

    At least the version of libgit2 matches, so probably yes.

  13. roryprimrose commented on Nov 9, 2016

    @roryprimrose
    Author

    We downgraded for a few weeks to avoid the perf issues, but had to go back to 3.6.4 to get pull request id values in the version. Builds are back to > 20 minute builds. :(

  14. DanielRose commented on Nov 25, 2016

    @DanielRose
    Contributor

    @roryprimrose In 3.6.0 and 3.6.1, the caching of information was broken (#942). Could this be part of the problem you are seeing? Do you have separate repositories for each project or are they shared?

  15. roryprimrose commented on Nov 29, 2016

    @roryprimrose
    Author

    If the caching was fixed after 3.6.1 then no as we are back up to 3.6.4. We have a repository per solution under the one VSTS account.

  16. 14 remaining items

  17. asbjornu commented on Nov 6, 2017

    @asbjornu
    Member

    If removing GitVersionTask from a project is a workaround, it points to the caching not working as intended. The version should only be calculated once for the first compiled project in a solution, cached to disk and then read from cache on subsequent project builds. Is this not happening? How does the GitVersion log look like?

  18. kyberias commented on Nov 6, 2017

    @kyberias

    Does GitVersion work as intended if it calculates the version for 7 to 15 minutes (with or without cache)?

    I cannot share the log here for obvious reasons. What should the log look like?

    I may need to check whether we have some issues with the cache. If TFS build always cleans git, I guess that will clear up the cache as well?

  19. asbjornu commented on Nov 6, 2017

    @asbjornu
    Member

    The log should contain lines mentioning a .git/gitversion_cache/<hash>.yml file and whether it is found on disk or not. If the file is not found, GitVersion will have to recalculate the version number for every project in the solution. You can see which log messages are logged in relation to this in the GitVersionCache class:

    public class GitVersionCache
    {
    readonly IFileSystem fileSystem;
    public GitVersionCache(IFileSystem fileSystem)
    {
    this.fileSystem = fileSystem;
    }
    public void WriteVariablesToDiskCache(GitPreparer gitPreparer, GitVersionCacheKey cacheKey, VersionVariables variablesFromCache)
    {
    var cacheDir = PrepareCacheDirectory(gitPreparer);
    var cacheFileName = GetCacheFileName(cacheKey, cacheDir);
    variablesFromCache.FileName = cacheFileName;
    Dictionary<string, string> dictionary;
    using (Logger.IndentLog("Creating dictionary"))
    {
    dictionary = variablesFromCache.ToDictionary(x => x.Key, x => x.Value);
    }
    Action writeCacheOperation = () =>
    {
    using (var stream = fileSystem.OpenWrite(cacheFileName))
    {
    using (var sw = new StreamWriter(stream))
    {
    using (Logger.IndentLog("Storing version variables to cache file " + cacheFileName))
    {
    var serializer = new Serializer();
    serializer.Serialize(sw, dictionary);
    }
    }
    }
    };
    var retryOperation = new OperationWithExponentialBackoff<IOException>(new ThreadSleep(), writeCacheOperation, maxRetries: 6);
    retryOperation.Execute();
    }
    public static string GetCacheDirectory(GitPreparer gitPreparer)
    {
    var gitDir = gitPreparer.GetDotGitDirectory();
    var cacheDir = Path.Combine(gitDir, "gitversion_cache");
    return cacheDir;
    }
    private string PrepareCacheDirectory(GitPreparer gitPreparer)
    {
    var cacheDir = GetCacheDirectory(gitPreparer);
    // If the cacheDir already exists, CreateDirectory just won't do anything (it won't fail). @asbjornu
    fileSystem.CreateDirectory(cacheDir);
    return cacheDir;
    }
    public VersionVariables LoadVersionVariablesFromDiskCache(GitPreparer gitPreparer, GitVersionCacheKey key)
    {
    using (Logger.IndentLog("Loading version variables from disk cache"))
    {
    var cacheDir = PrepareCacheDirectory(gitPreparer);
    var cacheFileName = GetCacheFileName(key, cacheDir);
    if (!fileSystem.Exists(cacheFileName))
    {
    Logger.WriteInfo("Cache file " + cacheFileName + " not found.");
    return null;
    }
    using (Logger.IndentLog("Deserializing version variables from cache file " + cacheFileName))
    {
    try
    {
    var loadedVariables = VersionVariables.FromFile(cacheFileName, fileSystem);
    return loadedVariables;
    }
    catch (Exception ex)
    {
    Logger.WriteWarning("Unable to read cache file " + cacheFileName + ", deleting it.");
    Logger.WriteInfo(ex.ToString());
    try
    {
    fileSystem.Delete(cacheFileName);
    }
    catch (Exception deleteEx)
    {
    Logger.WriteWarning(string.Format("Unable to delete corrupted version cache file {0}. Got {1} exception.", cacheFileName, deleteEx.GetType().FullName));
    }
    return null;
    }
    }
    }
    }
    static string GetCacheFileName(GitVersionCacheKey key, string cacheDir)
    {
    return Path.Combine(cacheDir, string.Concat(key.Value, ".yml"));
    }
    }

  20. tebeco commented on Jan 25, 2018

    @tebeco

    (edited out / sorry i now understand my comment was a bit too direct)

  21. OFark commented on Mar 13, 2018

    @OFark

    For what it's worth I'm using the latest version on Chocolatey - 3.6.4, and it works fine on my development machine, seconds to run. But as soon as I push my changes and ask Bamboo to build it it fails as it takes too long. Command line on our Bamboo server in the build-dir and GitVersion takes minutes to run. Seems to be environmentally affected.

  22. OFark commented on Mar 13, 2018

    @OFark

    So further to my last comment I can say that the Bamboo server randomly takes a long time. Around 3 minutes, other times it's instant (ish).
    GitVersionLog.txt

  23. asbjornu commented on Mar 21, 2018

    @asbjornu
    Member

    @tebeco: The project is not abandoned. I believe the work @JakeGinnivan has started on in #1243 and #1244 will solve most performance problems. The only problem is that it's a massive task to recreate all of LibGit2Sharp's models and map them into GitVersion's own internal (immutable, in-memory) model. If anyone experiencing this can provide help with moving either of those pull requests, it would be highly appreciated.

  24. kyberias commented on Mar 22, 2018

    @kyberias

    But the first PR was updated last summer (in June!) and the other PR hasn't been touched in months.

    It may have not been abandoned totally, but clearly these issues have no priority and/or lack of resources.

  25. asbjornu commented on Mar 22, 2018

    @asbjornu
    Member

    We do have a lack of resources. For most people, myself included, GitVersion seems to do what it should without a problem. It is therefore difficult to muster the energy to spend our free time to scratch an itch we don't have ourselves.

    This is a community driven project with no financial backing, so the best thing we can hope for is for someone who has this itch to come along and figure out the problem and submit a pull request. If someone involved in this issue thread can do just that, us maintainers would be thrilled to review and merge it.

  26. roryprimrose commented on Mar 22, 2018

    @roryprimrose
    Author

    There should be mandatory community service (via contributing PR's) for people who complain about the speed and priority that other people give to open source.

  27. kyberias commented on Mar 24, 2018

    @kyberias

    @roryprimrose, oh I agree. I'm not complaining about speed per se, I'm merely saying that it's not fair to answer to criticism about "project abandonment" with links to PRs that haven't been touched for a year!

    My specific performance problem (#1327) seems to be related to Gitversion getting confused and going crazy due to a large number of (feature) branches without a naming convention.

  28. asbjornu commented on Jun 27, 2019

    @asbjornu
    Member

    Seeing how deep you have dug to figure out the source of this problem already, @kyberias, would you be up for trying to figure out a solution? As mentioned, I would be thrilled to review and merge any optimization you're able to conjure in a PR.

  29. kyberias commented on Jun 27, 2019

    @kyberias

    Thanks for responding. I couldn't find enough time to do further investigations but it seems some months ago our team was able to solve most drastic GV performance problems by updating to final 4.0.0 version. It's still not super fast but but at least keeps quite stable.

  30. asbjornu commented on Jun 27, 2019

    @asbjornu
    Member

    I'm glad to hear that. If you experience problems with GitVersion again, access to a repository where the problem can be reproduced or a PR that fixes the problem will be highly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions