I don't seem to be able to pin-point why, but everytime I run tests with NCrunch, Antimalware Service Executable starts hogging CPU (up 30-40%). It's the same behavior in both VS and Rider. I'm not sure if it can be compared with other test runners, considering how much parallelism NCrunch can utilize, which I guess means more work for Microsoft Antivirus. I've tried to exclude every directory I can think of that NCrunch might use, but nothing helps, beside turning off real-time protection completely.
I've excluded:
- the directory of the source code
- NCrunch workspace directory
- JetBrains Rider installation directory
- Visual Studio installation directory
- NCrunch local app data directory
- the .nuget cache directory
- the dotnet directory (under Program Files)
- Rider's local appdata directory
Non makes any difference...
What am I missing?
Was just about to post, when I figured it out! It was the RDI storage directory! Excluding it lowered Antimalware CPU usage when running tests to a few percent.
I'll post this in case it might help someone else. All good!