UE4 Slow Shader Compile

For anyone else who has this issue. I found I needed two fixes.

1 - Using this BuildConfiguration.xml (details on where to set/add it can be found here: Build Configuration | Unreal Engine Documentation)

2 - Uninstalling Incredibuild. To uninstall incredidbuild; do it through the Visual Studio Installer.

This fixed two issues for me:

  • The slow Shader compile times. Sometimes creating a new project would get “stuck” at 39%. You could see with Task manager during this period only 1 instance (at a time) of the ShaderCompileWorker running. Removing Incredibuild (afterwards) showed multiple instances and 100% CPU usage on all cores.
  • Compiling the Engine from source. This went from 3 hours with barely any CPU usage, to ~30 minutes (with 100% usage on all cores).

BuildConfiguration.xml:

<?xml version="1.0" encoding="utf-8" ?> 1 true false 2 12 2 12

Obvisouly be sure to set the correct core count for your CPU (also using 3900x)