Articles
14

The Windows Defender Antimalware executable slowed things a lot

I ran task manager. As VS starts; Antimalware uses more CPU than VS. About 20x as much.

Further research found Visual Studio's 'slave' processes, used to execute a build, also trigger Antimalware activity.  I configured Antimalware to not scan VS and it's slave processes.

For those who prefer not to type them all into the ui; start a PowerShell prompt (I used elevated - not certain if that is required); and paste this in:

Set-MpPreference -ExclusionProcess devenv.exe, TE.ProcessHost.Managed.exe, csc.exe, iisexpress.exe, msbuild.exe, vshost32-clr2.exe, vshost-clr2.exe, vshost32.exe, VBCSCompiler.exe, w3wp.exe

Use completely at your own risk. Further information here Set-MpPreference.
       
I saw it reduce a small project build from 0m38s (no exclusions) to 0m06s (exclusions listed above).

If you prefer using the Windows GUI; Go to Update & Security -> Settings -> Windows Defender. Open Defender and in the Settings selection, choose Exclusions, add the process names individually.

Posted in: Visual Studio

Comments

There are currently no comments, be the first to post one!

Post Comment

Only registered users may post comments.
Copyright 2002-15 by Dynamisys Ltd