Cortex XDR greatly affects C++ build performance

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cortex XDR greatly affects C++ build performance

L0 Member

I have a C++ project that I build using Visual Studio 2022. When I build it on a PC with Cortex XDR installed, the build takes more than 3 hours. It looks as if Cortex XDR is analyzing every .obj file generated during the build process.

Without Cortex XDR, the same build takes slightly less than 1 hour.

The Cortex XDR application and its configuration are managed by the IT department. What can I communicate to the IT department so that they can configure Cortex XDR appropriately, in such a way that we do not suffer this significant slowdown when building our projects?

1 REPLY 1

L5 Sessionator

Hello @jjfernando ,

 

Greetings for the day.

 

To resolve the significant build latency you are experiencing, you should communicate a specific set of Path Exclusions and Performance Tuning requests to your IT department. Visual Studio 2022 generates a massive volume of temporary files (.obj, .tlog, .pch, .pdb) and short-lived processes that trigger "Real-Time Protection" and "Behavioral Threat Protection" in Cortex XDR, leading to the 300% increase in build time you described.

 

------------------------------------------------

 

 

1. Process Exclusions (High Priority) Ask IT to add the following Visual Studio and C++ compiler executable paths to the Process Exclusion list. This prevents Cortex XDR from monitoring the child processes spawned by the IDE during every compilation step:

  • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC*\bin\Hostx64\x64\cl.exe (The C++ Compiler)
  • C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC*\bin\Hostx64\x64\link.exe (The Linker)
  • C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe (Visual Studio IDE)
  • C:\Windows\Microsoft.NET\Framework64*\MSBuild.exe (The Build Engine)

 

2. Path/Folder Exclusions (Performance Tuning) Request that IT exclude your specific project build directories from Real-Time Protection (Scan on Write/Open). This is where the thousands of .obj and .tlog files are generated:

  • Your Project Root: D:\Path\To\Your\Source\Code* (Include subdirectories)
  • Intermediate Output Folders: Usually named Debug/, Release/, x64/, or obj/ within your project structure.
  • Visual Studio Temp Folders: %LOCALAPPDATA%\Microsoft\VisualStudio*\

3. Behavioral Threat Protection (BTP) Tuning Since C++ builds involve many rapid process executions (a behavior that mimics some malware), ask IT to check if the Behavioral Threat Protection or Ransomware Protection modules are showing high "CPU/Disk overhead" logs for cl.exe. They may need to specifically exclude the compiler from these behavioral modules.

 

If you feel this has answered your query, please let us know by clicking like and on "mark this as a Solution".

 

Thanks & Regards,
S. Subashkar Sekar

  • 30 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!