Antivirus Impact on Build Speed

Some antivirus software can interfere with the IDE build process, causing builds to run dramatically slower. When you run a build in the IDE, many class files are created on your computer. If your antivirus software has real-time scanning enabled, the antivirus can force the build process to halt each time a file is created while the antivirus scans that file.

If you’re using Windows Defender, the IDE automatically checks whether you have real-time scanning enabled, and whether the scanning is configured to process directories where the IDE writes a lot of files.

The IDE offers you a possibility to exclude those directories from scanning automatically (this feature is available in 2019.2+ IDE versions).

If you prefer to perform the necessary configuration manually, you can do so by following these steps:

  • Click the Start button
  • Type “Windows Security”
  • Click on “Virus and threat protection”
  • Click on “Manage settings” under “Virus & threat protection settings”
  • Scroll down if needed, and then click on “Add or remove exclusions”
  • For every folder shown in the notification, press the + button, select “Folder” from the menu, and select the folder.

If you’re using a different anti-virus product, you may still be impacted by the problem, but there is no possibility to detect or correct this automatically. If you’re experiencing poor build performance, please follow the instructions of your anti-virus product to exclude the following directories from real-time scanning:

  • The directory of your project
  • The whole JetBrains directory for caches and settings: 
    ~/Library/Application Support/JetBrains

    Alternatively, you may add the directory used by an exact version of IDE to store settings and caches. It should be modified with every IDE update, though.
  • The Gradle cache directory (%USERPROFILE%\.gradle)

We also recommend excluding the IDE process from the antivirus to improve the startup performance.

Caution: To ensure that your computer is safe from malicious software, you should not completely disable real-time scanning or your antivirus software.

Note: IDE runs powershell.exe process to detect if Windows Defender is active and to exclude the folders from the antivirus. This may trigger suspicious activity detection by some other antivirus tools like TrendMicro. This behavior is by design and the corresponding source code can be found on GitHub. It's safe to permit running PowerShell from the IDE.

672 out of 751 found this helpful

Hello, I have applied for my plugin for a long time and multiple times, but it has not been approved. Can you please inform me of the reason?


This only works if you have admin privileges on your computer, which is very rarely the case nowadays for company computers.

In my case, I ship an application with a custom run-time image, and I have to re-create it as part of the build every-time a new module needs to be added to the jre. That build takes forever, because I have no admin rights to configure the exclusions.

Are there plans to assess the feasibility of implementing a different workaround in the future?


> This only works if you have admin privileges on your computer, which is very rarely the case nowadays for company computers.

You should contact your IT/security team for assistance.


The problem is that each version of the editor has its own folder and you need to configure the antivirus each time. It was impossible to make one version.
For example:
Just do it already


Aaaand it's broken again… I have both exclusions for intellij pluss an exclusion for the repo in windows defender, and I still get the error whenever I open a new project


Hi westfire, same issue here.

If i launch their powershell with the same switch that the IDE is automatically asking me to launch, i get the same warning after opening it, same folders.

I wonder if in an automatic deployment scenario like with SCCM, the first part of the script can be avoided (the elevator.exe thing) since SCCM is allready executing the script with full permission on the client machine and what are those numbers 32648, the tmp directory, --::-- ? Can anybody enlight me on this?
Thank you very much



Please sign in to leave a comment.

Have more questions?

Submit a request