Difference between revisions of "Resolving slow build issues in Embedded Studio on Windows"

From SEGGER Wiki
Jump to: navigation, search
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When building large projects you may experience a slowdown in build time and high CPU load. This is normal as the default for Embedded Studio is to launch parallel builds where possible.
+
When building large projects you may experience a slowdown in build time and high CPU load.
  +
The high CPU load is normal as the default for Embedded Studio is to launch parallel builds where possible to build faster.
   
  +
However, the build process may be slowed down.
However, Windows antimalware and antivirus checking runs in the background and checks each file that is written. During a build, many, many files are written by the compilation process (assembly language intermediate files and object files, for instance), and the Windows antimalware service checks each one of them. If you open the Task Manager what you see is that up to 50% of available CPU cycles are taken by the antimalware checks along with a large memory requirement:
 
  +
This can be caused by the Windows Defender antimalware and antivirus checks.
  +
  +
Windows Defender runs in the background and check each file that is created and written.
  +
During a build, many, many files are written by the compilation process (assembly language intermediate files and object files, for instance), and the Windows antimalware service checks each one of them.
  +
If you open the Task Manager what you see is that up to 50% of available CPU cycles are taken by the antimalware checks along with a large memory requirement:
   
 
[[File:Task Manager High CPU Use.png]]
 
[[File:Task Manager High CPU Use.png]]
   
== Excluding volatile work folders from antimalware checks ==
+
== Excluding volatile work folders from Windows Defender ==
   
 
It is possible to exclude your work directories from antimalware checks and recover the CPU cycles that the antimalware check consumes.
 
It is possible to exclude your work directories from antimalware checks and recover the CPU cycles that the antimalware check consumes.
Line 14: Line 20:
 
* Click <b>Virus & threat protection</b>.
 
* Click <b>Virus & threat protection</b>.
 
* Under <b>Virus & threat protection settings</b> click <b>Manage settings</b>.
 
* Under <b>Virus & threat protection settings</b> click <b>Manage settings</b>.
* Under <b>Exclusions</b> click <b>Add or remove exclusions<b>.
+
* Under <b>Exclusions</b> click <b>Add or remove exclusions</b>.
 
* Click <b>Add an exclusion</b>.
 
* Click <b>Add an exclusion</b>.
* Select <b>Folder<b> and add the root folder of your working area.
+
* Select <b>Folder</b> and add the root folder of your working area.
   
 
=== On Windows 7 ===
 
=== On Windows 7 ===
   
* Click the <b>Start</b> button and run <b>Microsoft Security Essentials<b>.
+
* Click the <b>Start</b> button and run <b>Microsoft Security Essentials</b>.
 
* Select the <b>Settings</b> tab.
 
* Select the <b>Settings</b> tab.
* Click <b>Excluded files and locations<.b>.
+
* Click <b>Excluded files and locations</b>.
 
* Click <b>Browse</b> and select the root folder of your working area.
 
* Click <b>Browse</b> and select the root folder of your working area.
 
* Click <b>Add</b>.
 
* Click <b>Add</b>.
 
* Click <b>Save changes</b>.
 
* Click <b>Save changes</b>.
 
* Allow changes to be saved, if prompted.
 
* Allow changes to be saved, if prompted.
  +
  +
== Resolving issues with other antimalware tools ==
  +
  +
When you are using another antimalware or antivirus tool, you might experience similar issues.
  +
  +
These can be caused by the checks described above.
  +
Another reason in some cases is that the antimalware tool slows down the build tools itself.
  +
  +
Embedded Studio and all included executables are non-malicious and digitally signed.
  +
This should stop the tools from checking them.
  +
  +
However, some antivirus software might ignore this and continuously check the build tools on each invocation,
  +
which might slow down the tools itself or, as Windows Defender, require hughe CPU usage.
  +
  +
In that case, contact the antimalware software vendor for how to whitelist Embedded Studio or exclude it and the work directories from malware checks.

Latest revision as of 17:54, 10 August 2021

When building large projects you may experience a slowdown in build time and high CPU load. The high CPU load is normal as the default for Embedded Studio is to launch parallel builds where possible to build faster.

However, the build process may be slowed down. This can be caused by the Windows Defender antimalware and antivirus checks.

Windows Defender runs in the background and check each file that is created and written. During a build, many, many files are written by the compilation process (assembly language intermediate files and object files, for instance), and the Windows antimalware service checks each one of them. If you open the Task Manager what you see is that up to 50% of available CPU cycles are taken by the antimalware checks along with a large memory requirement:

Task Manager High CPU Use.png

Excluding volatile work folders from Windows Defender

It is possible to exclude your work directories from antimalware checks and recover the CPU cycles that the antimalware check consumes.

On Windows 10

  • Run the Windows Security app using the Search box in the task bar.
  • Click Virus & threat protection.
  • Under Virus & threat protection settings click Manage settings.
  • Under Exclusions click Add or remove exclusions.
  • Click Add an exclusion.
  • Select Folder and add the root folder of your working area.

On Windows 7

  • Click the Start button and run Microsoft Security Essentials.
  • Select the Settings tab.
  • Click Excluded files and locations.
  • Click Browse and select the root folder of your working area.
  • Click Add.
  • Click Save changes.
  • Allow changes to be saved, if prompted.

Resolving issues with other antimalware tools

When you are using another antimalware or antivirus tool, you might experience similar issues.

These can be caused by the checks described above. Another reason in some cases is that the antimalware tool slows down the build tools itself.

Embedded Studio and all included executables are non-malicious and digitally signed. This should stop the tools from checking them.

However, some antivirus software might ignore this and continuously check the build tools on each invocation, which might slow down the tools itself or, as Windows Defender, require hughe CPU usage.

In that case, contact the antimalware software vendor for how to whitelist Embedded Studio or exclude it and the work directories from malware checks.