Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Possible performance issue for Git repositories
MatthewSteeples
#1 Posted : Sunday, November 8, 2015 8:27:17 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 142
Location: United Kingdom

Thanks: 7 times
Was thanked: 19 time(s) in 17 post(s)
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)
Remco
#2 Posted : Sunday, November 8, 2015 9:07:19 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
Hi Matthew, thanks for sharing this issue.

MatthewSteeples;7964 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;7964 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;7964 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.
MatthewSteeples
#3 Posted : Sunday, November 8, 2015 9:39:16 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 142
Location: United Kingdom

Thanks: 7 times
Was thanked: 19 time(s) in 17 post(s)
Remco;7965 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;7965 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.
MatthewSteeples
#4 Posted : Wednesday, December 16, 2015 6:16:48 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 10/28/2014(UTC)
Posts: 142
Location: United Kingdom

Thanks: 7 times
Was thanked: 19 time(s) in 17 post(s)
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
Remco
#5 Posted : Wednesday, December 16, 2015 9:05:53 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,161

Thanks: 964 times
Was thanked: 1296 time(s) in 1202 post(s)
MatthewSteeples;8133 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 :)

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download