Unreal Cloud Docs
Guides

Speed up Unreal Engine builds

Why Unreal Engine 5 builds are slow, and the changes that make the biggest difference, from incremental builds to a shared derived data cache.

If your Unreal builds take an hour, there's a good chance most of that hour is spent redoing work that was already done. Here's where the time goes, and what actually helps.

First, find the slow part

A packaged build has three main steps:

Compile
Your C++ code and plugins
Cook
Converts assets and compiles shaders. Usually the slowest by far
Stage and package
Everything into its final files

The build log shows how long each step took. Look there before changing anything. There's no point speeding up compiling if cooking takes 90% of the time.

Stop starting from scratch

This is the big one. If your build machine keeps its files between builds, it only recompiles the code that changed and recooks the assets that changed.

  • Don't use -clean on every build. Save it for when something seems off.
  • Don't check out a fresh copy for every build. Keep the build machine's workspace and just sync the changes.
  • Try iterative cooking. Add -iterate to your BuildCookRun command, and assets that haven't changed won't be cooked again. Occasionally it misses a change, so still do a full cook regularly, for example every night or before a release.

Share the derived data cache

The derived data cache, or DDC, is where Unreal keeps the results of expensive work, mostly compiled shaders and processed textures, so it doesn't have to do it again.

The catch is that every machine has its own DDC by default. A new build machine, or a teammate opening the project for the first time, starts from zero and recompiles every shader.

A shared DDC fixes that: once any machine has done the work, every other machine reuses it.

One machine does the work
For example, compiles a shader
Shared DDC stores the result
Every other machine reuses it
Teammates and build machines

The easiest version is a network folder everyone can read and write. Tell Unreal where it is with an environment variable:

setx UE-SharedDataCachePath "\\fileserver\UnrealDDC"

You can also set it per project in DefaultEngine.ini. If a network folder isn't enough for a larger team, Epic has Zen server and cloud-based cache options too.

This helps most with shaders. A first cook that compiles tens of thousands of shaders can drop to a fraction of the time once they're in the shared cache.

Compile fewer shaders

Every rendering feature your project supports multiplies the number of shader versions Unreal has to compile. Go through Project Settings → Rendering and turn off what you don't use, like lighting features or platforms you don't ship on. You'll get faster cooks and smaller builds.

Compile faster

  • Leave unity builds on. They're the default, and they combine source files so there's less to compile.
  • More CPU cores help a lot. Compiling code and shaders both use every core you give them.
  • Spread the work across machines. Recent engine versions include Unreal Build Accelerator for this, and tools like FASTBuild and Incredibuild do it too.

Give the machine a fast disk and plenty of memory

Cooking reads and writes an enormous number of files, so put the project and the DDC on a fast NVMe drive. Memory matters too: cooking a large project can use tens of gigabytes, and when it runs out, it slows to a crawl or crashes.

Only cook what you ship

  • In Project Settings → Packaging, list only the maps you actually ship. Otherwise test maps get cooked too.
  • Delete assets and plugins you don't use. Anything that's referenced gets cooked.
  • Leave -compressed off for internal test builds if size doesn't matter. Compression makes packaging slower.

Fast builds without the upkeep

Unreal Cloud keeps a derived data cache between your builds, so shaders and textures aren't recomputed every time, and there's no build machine or cache server for you to maintain. See Get Started.

On this page