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-forge 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 dependencies (unique conda.yaml file). 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 machine to make exclusion rules for these kinds of high-traffic folders to speed up the developer experience.

However you should only do this with the permission of your IT and temporarely.
Virusscanning is never a wasted effort and no operating system is safe, so do not take this step lightly

Here's how to create exclusion rules:

  • Open Virus & thread protection: Start -> type Virus and press Enter. anti-virus-01.png
  • Select Manage settings under Virus & threat protection settings anti-virus-01.png
  • Find and select Add or remove exclusions anti-virus-02.png
  • Select Add an exclusion -> Folder anti-virus-03.png
  • Browse to folder %USERPROFILE%\AppData\Local\robocorp and Select Folder anti-virus-04.png
  • Browse to folder C:\ProgramData\robocorp and Select Folder anti-virus-05.png
  • 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.

anti-virus-06.png

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