I had NCrunch show a warning today, seemingly at random, about use of the Microsoft Git Provider in Visual Studio (see below). The stackoverflow post it referred to was quite old (circa 2014), and a lot of the information seemed to be out of date.
I checked my configuration in Visual Studio 2022, which only listed "Git" as the source control plug-in (from Tools | Options | Source Control | Plugin Selection). I have git installed via the winget package Git.Git, and I do not have the Visual Studio component Git for Windows installed.
Given this, the warning seemed strange to me, as the language in the warning seemed specific to Git for Windows.
I decided to see if changing the cache storage path would have an effect. I set the NCrunch cache storage path for this solution to "D:\NCrunchCache". NCrunch was able to use this path, and I saw an immediate and significant boost in performance. Test runs are now being completed very fast, and the warning has disappeared.
I am now wondering
- am I correct in assuming that the warning is (or was) intended only for Git for Windows?
- is there is a general problem with Windows + file system changes in large git repositories + all git providers causing constant rescans?
- is it ok to use a hard coded path for the NCrunch cache storage path, as your documentation refers only to relative paths or using environment variables (e.g. %temp%)?
Thanks in advance
warning text from NCrunch:
Quote:The Microsoft Git Provider has been detected as resident in the VS IDE, and this solution is part of a large git repository containing many entries.
The MS Git Provider has a performance issue that causes it to constantly re-scan the entire repository when file system changes are detected anywhere underneath the repository root or in nested directories. This problem exists regardless of how Git is configured with .gitignore files, and is responsible for high CPU consumption in the IDE on solutions with large Git repositories.
Because NCrunch often updates files within its own cache directory (_NCrunch_SOLUTIONNAME), it can act as a continuous trigger for this performance problem.
If you are not actively using the Microsoft Git Provider, it is strongly recommended that you remove it from your system. It is possible to disable this extension through Visual Studio's 'Tools->Options-Source Control' setting, but the extension very often re-enables itself silently at a later date. To permanently remove this extension, see
https://stackoverflow.co...t-git-provider#23512676
Alternatively, you can move the NCrunch cache storage directory outside of the Git repository path by using the 'NCrunch cache storage path' solution-level NCrunch configuration setting. This will prevent NCrunch from directly triggering the performance issue, though it may still appear in response to file system activity caused by other processes.
Click here to hide this warning