Windows Defender taking a lot of resources

Common note on all virus scanners

Any virus scanner needs to process at some level the file written to disk to be effective. This means that any virus scanner will use up CPU and will slow down file I/O. In this sense, in our tests, Windows Defender is performing the best of the bunch, but it still pretty much doubles the time to perform file actions.

The guide below is for Windows Defender, but similar features are in pretty much any virus scanner.

Disclaimer: Do these only if you know what you are doing. IT policies usually control these in a company setting, so you may not create exclusions, and you should contact your IT.

Antimalware Service Executable taking a lot of resources

Python and conda based development environment handling and isolation create many small files when creating new environments. This happens during the initial start and when you open robots with a new environment setup (unique conda.yaml file). The environments consist of a lot of small files. Windows is actively trying to protect the user from malicious files, meaning there is a lot of work for Windows Defender.

It is quite common for development environments to guide to make exclusion rules for these kinds of high-traffic folders to speed up the developer experience.

Here's how to create exclusion rules:

  1. Open Virus & thread protection: Start -> type Virus and press Enter.


  2. Select Manage settings under Virus & threat protection settings


  3. Find and select Add or remove exclusions


  4. Select Add an exclusion -> Folder


  5. Browse to folder %USERPROFILE%\AppData\Local\robocorp and Select Folder


  6. Browse to folder C:\ProgramData\robocorp and Select Folder


  7. Exclusion is now done and should be visible on the list.

Note: The path for the exclusions needs to be an absolute path like in the picture below, so the %USERPROFILE% has to be opened to the full path. The sequence above should do that, but we have reports on that not happening.


  1. You can now close the settings. This setting should ease up the Antimalware Service Executable process from using up too many resources.
July 14, 2022