11

Since past two months or so I have been observing a strange phenomenon with the Real Time Protection Service that comes bundled in as a part of Windows Defender on Windows 10.

When this service is set to ON Visual Studio builds take an excruciatingly long time to complete. Visual Studio itself takes forever to launch. Further if there are managed add-ins (written using Visual Studio Tools For Office, VSTO) installed in Outlook, Outlook takes 13-14 seconds to launch! When this service is disabled Outlook again launches within two seconds or so.

I have raised this on Twitter with Windows Support and tried discussing this online with Microsoft Support for an hour without any resolution. Looking around the internet I can see there are users who are reporting same problems such as

http://ardalis.com/speed-up-visual-studio-build-times

Slow page refresh times during development

I have been noticing this for only two months or so. I have tried spinning up new VMs in Azure etc. to test this and in every instance I have noticed this Real TIme Protection Service to be the culprit. My main issue is the Outlook Add In load time to be honest.

I tried posting this on Microsoft answer's site here but so far no luck. I was hoping if anyone here knows how to get this resolved without adding exception for Outlook in Real Time Protection Service (after which the add-ins load as expected within 200 milliseconds).

Community
  • 1
  • 1
Nikhil
  • 3,304
  • 1
  • 25
  • 42
  • I had the same issue. In my case, visual studio was freezing on startup. Disabling real time protection fixed the issue. – Mher Sarkissian Jun 07 '16 at 19:09
  • Suddenly last week this issue mitigated itself with respect to launching Outlook at least. I suspect the last push of Windows update has probably made some changes. I will continue to monitor Visual Studio and see how that goes. – Nikhil Jul 15 '16 at 08:14
  • This is easily fixable on your PC as shown by answers below. The real problem is that all our performance efforts on our app that reads/writes files are ruined by WndDefender Real Time Protection Service on our users' desktops, and we cannot do anything about it. – Patrick from NDepend team Aug 11 '23 at 07:50

4 Answers4

3

I had the same symptoms and my problem was fixed by disabling logs in Microsoft .Net Framework Assembly Binding Log Viewer (FUSLOGVW.exe). I forgot that I was running a test and left logging on.

  1. Run the viewer as administrator.
  2. Click Settings button.
  3. Check Log Disabled
mkdave99
  • 835
  • 10
  • 15
  • Thanks. I had tried that too but no luck. As I mentioned it resolved on its on across my environments one day so I am guessing whatever it is MS fixed it. – Nikhil Sep 02 '16 at 00:49
  • I ran into this problem again and this time around I tried this solution and it worked! – Nikhil Oct 30 '18 at 20:08
3

Try excluding Visual Studio related file types from Windows Defender like this person did for Delphi:

enter image description here

If you are cool with no protection at all you could disable Windows Defender, but I wouldn't recommend it.

Matthew Lock
  • 13,144
  • 12
  • 92
  • 130
0

Another answer to this problem, rather than excluding certain file extensions from Real Tme Scanning, is to exclude certain directories. Then you can exclude your Delphi/Visual Studio/Eclipse workspace.

I also found that certain apps during development make heavy use of the tmp dir. You can create a specific temp dir for your dev work and then configure your IDE/dev tools to use that temp dir instead of the system one, and then exclude that temp dir from real-time scanning.

Fr Jeremy Krieg
  • 482
  • 5
  • 13
0

Here are two links to fix performance issues caused by Real-Time scanning, by excluding VS processes and Folders, thus improving the performance of VS in general but especially when Building.

1- Ready PowerShell script: Adds Windows Defender exclusions for Visual Studio 2019 by Ryan-Efendy

PS: by default executing scripts is disabled, just enable before executing, and disable after executing

Set-ExecutionPolicy unrestricted
run command
Set-ExecutionPolicy restricted

2- Same but you have to do the steps manually.

Tweaking the environment to speed up Visual Studio by Burak Tasci

Amro
  • 1,369
  • 2
  • 10
  • 16