Remco;14072 wrote:Thanks Michael. This does help to narrow things down.
I'm wondering if this might be caused by general system lag triggered by overconsumption of the background tests. Do you have any tests in your solution that are particularly large? For example, anything that has a long running time and might interact with an external process (i.e. a database).
That depends on the definition of large. We have around 1100 tests, where around 100 are largish - but NCrunch does not report them as long running. They are large (1500+ LOC is not unusual) as we need to fake quite a bit - but none of them use any external resources / processes.
NCrunch hasn't had an issue until lately.
I have recently increased the number of threads for NCrunch from 1 to 2 - which of course double the workload - but I figured it was handled in satellite processes on dedicated cores - it shouldn't affect VS.
Remco;14072 wrote:Also, can you confirm if you have your 'Engine hosting strategy' NCrunch configuration set to 'HostInsideIDE'? (if not, please don't turn this on)
No, this setting is set to "x64SatelliteProcess"
Remco;14072 wrote:Further, can you share the overall specifications of the machine you're running on, and the approx size of your codebase?
Machine: i7-6700, 3.40 GHz, 4 cores (8 threads - 2 dedicated to NCrunch), 24 GB ram. I use RAM disk for both NCrunch and solution output directories in VS. Because of the RAM disks using 14 GB, there's 2 GB free with VS etc. running.
Solution: 57 projects (C#), around 70-80.000 LOC, 1100 unit tests.
VS-plugins installed:
R#, but not enabled (only when absolutely needed)
OzCode
Sandcastle Help File Builder
Atomineer
Roslynator
Visual Studio IntelliCode
One "issue" I have noticed (but may very well be wrong) is, that it seems that NCrunch with v4.1.0.1 seems somewhat more aggressive in determining whether or not a given unit test should run or not.
If(!) my memory serves me right, when I made a change to a lower level project - then NCrunch might only mark a few unit tests to be run - but with 4.x it is not unusual to see that almost all unit tests are marked for running (seems that all that are using the given assembly - which means that 1 minor change may result in 1000+ unit tests being marked for run).
Also, yesterday I had to enable R# for a few changes - which of course made the VS quite a bit slow (=usual issue with R#). After I disabled R# again, VS was continually "screaming" about NCrunch slowing things down - enough that I had to disable NCrunch. Even though I had around 30 files open in VS, the memory preasure was only around 1 GB at the time - but VS was lagging quite a bit. Disabling NCrunch fixed the lagging issue.
Do you think having NCrunch on a dedicated, external machine would solve the issue? I personally don't think so, as it seems to me that it could be the NCrunch's Roslyn plugin (which I guess NCrunch has?) that might be the cause of the problem I am experiencing.
/Michael