I recently upgraded from windows 10 to windows 11 with a clean install, and that's when I started noticing a problem.
I am doing development with python/pytorch, and some files I was working on were taking minutes to launch in windows 11, where they would start in seconds under windows 10. I narrowed the issue down to importing the pytorch library, and I noticed task manager shows quite a bit of activity from "Antimalware Service Executable - Microsoft Defender Antivirus Service".
So it seemed like I had found the problem, Defender was scanning the files in the library (it contains multiple gigabytes of dll files related to nvidia graphics) and that was slowing it down. So I did the sensible thing and added an exclusion for the folder. But, that didn't seem to stop it. Then I turned off the tamper protection setting, and the realtime protection setting. It still continued to scan when I import the library. I went as far as disabling realtime protection through the group policy editor, but still, nothing!
Just to confirm that I wasn't mistaken, I used Sysinternals Process Monitor to monitor MsMpEng.exe. As soon as I import the pytorch library, I can see it scanning these huge dll files that are contained within the folder that I excluded.
Is there anything else that I can try? I don't understand why it wont respect my decision to not keep scanning these files! I can't get anything done if I am waiting 1-2 minutes on it to scan every time!
I am doing development with python/pytorch, and some files I was working on were taking minutes to launch in windows 11, where they would start in seconds under windows 10. I narrowed the issue down to importing the pytorch library, and I noticed task manager shows quite a bit of activity from "Antimalware Service Executable - Microsoft Defender Antivirus Service".
So it seemed like I had found the problem, Defender was scanning the files in the library (it contains multiple gigabytes of dll files related to nvidia graphics) and that was slowing it down. So I did the sensible thing and added an exclusion for the folder. But, that didn't seem to stop it. Then I turned off the tamper protection setting, and the realtime protection setting. It still continued to scan when I import the library. I went as far as disabling realtime protection through the group policy editor, but still, nothing!
Just to confirm that I wasn't mistaken, I used Sysinternals Process Monitor to monitor MsMpEng.exe. As soon as I import the pytorch library, I can see it scanning these huge dll files that are contained within the folder that I excluded.
Is there anything else that I can try? I don't understand why it wont respect my decision to not keep scanning these files! I can't get anything done if I am waiting 1-2 minutes on it to scan every time!
- Windows Build/Version
- 24H2 / Build 26100.3775
My Computer
System One
-
- OS
- Windows 11
- Computer type
- PC/Desktop