I've no firm numbers on this, it's just a hunch.
We're using Git source control for our project as well as NCrunch. We've got the _NCrunch_ cache folder excluded from the project (using .gitignore) but I believe that Visual Studio thrashes about when files are modified in this folder anyway because it evaluates them each time. The symptoms we have is that the Untracked Files section in the Team Explorer tab flickers while NCrunch is doing it's thing, but no files ever appear in there.
Would it be possible to have the option to store the cache and files that are normally in here in a subfolder in %temp%?
Another alternative for this behaviour is that there are temporary files that are being created as part of the process that we've somehow not included so they're appearing and then disappearing rapidly.
Happy to help diagnose this if possible. Our project is 200,000 lines of code, 20 projects and 1584 tests (some of which are integration so take a few seconds to run)
Daily Usage Issues
Possible performance issue for Git repositories
Started by MatthewSteeples on 8,365 views
Remco NCrunch Developer
#7965
08 Nov 2015 21:07 UTC
Hi Matthew, thanks for sharing this issue.
This isn't a huge surprise to me, as the mechanics of watching files on the file system have some unfortunate limitations. I'd first recommend to make sure your git source control provider is fully up to date (make sure you have all VS updates installed), and that you then consider raising this as an issue with the team responsible for it. NCrunch isn't the only tool that makes changes to VCS ignored under the solution directory, and ideally the provider should be filtering out changes to ignored files before triggering any processing on them.
This would certainly make sense as a a feature request. My own preference would be to keep this in a relative path (rather than the %temp% directory) so that people can be fully aware of it and exercise control over it if they need to. This would also solve any ambiguity problems if a user has two solutions under the same name.
When processing tests with large amounts of trace output (>1k), NCrunch will stash the output from the test on disk rather than keep it in memory. This is to prevent the engine from being overwhelmed with trace data and sucking up tons of memory. It does this in temporary files inside the cache directory when the tests run. Unfortunately there's no way to disable this behaviour - the only way to avoid it is engineer the tests so they don't emit so much trace data.
MatthewSteeples wrote:I've no firm numbers on this, it's just a hunch.
We're using Git source control for our project as well as NCrunch. We've got the _NCrunch_ cache folder excluded from the project (using .gitignore) but I believe that Visual Studio thrashes about when files are modified in this folder anyway because it evaluates them each time. The symptoms we have is that the Untracked Files section in the Team Explorer tab flickers while NCrunch is doing it's thing, but no files ever appear in there.
This isn't a huge surprise to me, as the mechanics of watching files on the file system have some unfortunate limitations. I'd first recommend to make sure your git source control provider is fully up to date (make sure you have all VS updates installed), and that you then consider raising this as an issue with the team responsible for it. NCrunch isn't the only tool that makes changes to VCS ignored under the solution directory, and ideally the provider should be filtering out changes to ignored files before triggering any processing on them.
MatthewSteeples wrote:
Would it be possible to have the option to store the cache and files that are normally in here in a subfolder in %temp%?
This would certainly make sense as a a feature request. My own preference would be to keep this in a relative path (rather than the %temp% directory) so that people can be fully aware of it and exercise control over it if they need to. This would also solve any ambiguity problems if a user has two solutions under the same name.
MatthewSteeples wrote:
Another alternative for this behaviour is that there are temporary files that are being created as part of the process that we've somehow not included so they're appearing and then disappearing rapidly.
When processing tests with large amounts of trace output (>1k), NCrunch will stash the output from the test on disk rather than keep it in memory. This is to prevent the engine from being overwhelmed with trace data and sucking up tons of memory. It does this in temporary files inside the cache directory when the tests run. Unfortunately there's no way to disable this behaviour - the only way to avoid it is engineer the tests so they don't emit so much trace data.
Remco wrote:Hi Matthew, thanks for sharing this issue.
I'd first recommend to make sure your git source control provider is fully up to date (make sure you have all VS updates installed), and that you then consider raising this as an issue with the team responsible for it. NCrunch isn't the only tool that makes changes to VCS ignored under the solution directory, and ideally the provider should be filtering out changes to ignored files before triggering any processing on them.
Yep, that makes sense. We're already up to date (to the extent I'm on 2015 Update 1 RC at the moment) so I'll see if I can raise an issue through Connect.
Remco wrote:
When processing tests with large amounts of trace output (>1k), NCrunch will stash the output from the test on disk rather than keep it in memory. This is to prevent the engine from being overwhelmed with trace data and sucking up tons of memory. It does this in temporary files inside the cache directory when the tests run. Unfortunately there's no way to disable this behaviour - the only way to avoid it is engineer the tests so they don't emit so much trace data.
This probably is affecting us as we have some quite extensive logging in our integration tests.
Hi Remco,
Thanks for addressing part of this in the latest version by adding a config value for the cache storage path. Is it possible to make it so that this field accepts environment variables at some point and absolute paths? It doesn't seem that happy when I try and set the value to %TEMP%\NCrunchCache. For now we're setting it to ..\..\NCrunchCache (so it's outside of our source controlled repository) so it's not a problem for us any more but thought I'd suggest it.
Hope this makes sense, if you need any more information then let me know. Well done on this release, it's nice to see a focus on performance and quality every now and then.
Matthew
Thanks for addressing part of this in the latest version by adding a config value for the cache storage path. Is it possible to make it so that this field accepts environment variables at some point and absolute paths? It doesn't seem that happy when I try and set the value to %TEMP%\NCrunchCache. For now we're setting it to ..\..\NCrunchCache (so it's outside of our source controlled repository) so it's not a problem for us any more but thought I'd suggest it.
Hope this makes sense, if you need any more information then let me know. Well done on this release, it's nice to see a focus on performance and quality every now and then.
Matthew
Remco NCrunch Developer
#8135
16 Dec 2015 21:05 UTC
MatthewSteeples wrote:Hi Remco,
Thanks for addressing part of this in the latest version by adding a config value for the cache storage path. Is it possible to make it so that this field accepts environment variables at some point and absolute paths? It doesn't seem that happy when I try and set the value to %TEMP%\NCrunchCache. For now we're setting it to ..\..\NCrunchCache (so it's outside of our source controlled repository) so it's not a problem for us any more but thought I'd suggest it.
Hope this makes sense, if you need any more information then let me know. Well done on this release, it's nice to see a focus on performance and quality every now and then.
Matthew
Hi Matthew -
I'll see what I can do :)
Post a reply
Log in to reply.