Build time increased ~10x when migrating from 5.5 to 5.6

Heyo :waving_hand:

I’m one of the devs working on a C++ plugin, and we’re trying to migrate it to the newly released 5.6.0, coming from 5.5.4.

We have an empty C++ project with just our plugin inside of it and we’ve a huge increase in compilation time🙁

For a clean & build project we notice this delta:
UE 5.6.0: Total execution time: 925.64 seconds (~15.5 minutes)
UE 5.5.4: Total execution time: 104.20 seconds (~1.7 minutes)

This is with the project in identical state, clean checkout (i.e. no Binaries, Intermediate, Saved, .vs folders) of the same commit, the only difference being the EngineVersion in the .uplugin and .uproject, followed by a ‘regenerate visual studio files’.

Our gut feeling is that some default behaviour of precompiled headers has changed, but even after overriding the bUsePCHFiles, bForceUnityBuild, etc… in the buildconfiguration.xml, the huge difference in build time remains.

For extra context, our plugin is split into 8 modules, with a total of 81 header files and 42 .cpp files.

Any advice or things to try / double-check would be appreciated, as we’re quite stumped :sweat_smile:

I am still learning unreal but I wonder if maybe you have some implementation in header files instead of implementation files? That is what usually increases build time for me in the cpp projects I have worked in (moving all implementations to .cpp makes dependencies not trigger rebuild where they are used). But since unreal has do many macros I don’t know what happens in it …

it’s seems that place this macro in CPP file

#include UE_INLINE_GENERATED_CPP_BY_NAME(CppFileName)

can reduce compilation time.

Ah, after digging a bit through the buildconfiguration apparently in Unreal 5.6 the UBAExecutor is now enabled by default, where it was disabled by default in 5.5.

After manually disabling it I’m getting back to my old compilation speed of ~90 seconds instead of 10min.

For anyone encountering the same problem, edit your BuildConfiguration.xml to this:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<BuildConfiguration>
		<bAllowUBAExecutor>false</bAllowUBAExecutor>
	</BuildConfiguration>
</Configuration>

Bit strange why this change in default behavior wasn’t in the patch notes. :thinking:

5 Likes

Can you provide some system spec details on the impacted user? Also each compile through UBA produces a .ubatrace file that can be opened via the UbaVisualizer in Engine\Binaries\UnrealBuildAccelerator\Win64. That will show system info.

We’ve had the UBA Executor enabled here internally by default since 5.4 was being launched and have generally seen improved compile times for developers, when just using the UBA Local mode, no remote helpers.

This is the .uba file from the 5.6 default configuration. (the ~10min build)

Also,
We did notice that the 5.5.4 also generated a .uba file; despite the log stating “(UBA disabled)”?
Not sure if it helps but this is from that one, (the ~90sec build)

They’re two checkouts of the same repo at the same commit, just different engine versions.

Here’s the machine specs

Note: We saw that the name of the machine is apparently in these .uba files, so I can’t post them here on the forums, but we’re fine to send them in a ticket or something, if needed.

Just imagine if it wasn’t called “UnrealBuildAccelerator”