Windows Defender Real Time Protection Service slowing down Visual Studio etc
Asked Answered
Y

4

13

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).

Yelena answered 25/4, 2016 at 7:7 Comment(3)
I had the same issue. In my case, visual studio was freezing on startup. Disabling real time protection fixed the issue.Airtoair
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.Yelena
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.Spandex
E
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
Excoriate answered 29/8, 2016 at 19:53 Comment(2)
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.Yelena
I ran into this problem again and this time around I tried this solution and it worked!Yelena
A
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.

Amandine answered 24/9, 2017 at 3:39 Comment(1)
Perhaps related: Slowdown of Microsoft Visual Studio due to different Virus scannerAbbevillian
T
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.

Tetramethyldiarsine answered 30/10, 2019 at 3:18 Comment(0)
Z
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

Zoril answered 20/5, 2020 at 9:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.