Slow compile time fix? Is this a bad idea

I always have to pause the videos for compiling to catch up, it took forever.

Google suggested this fix, any unintended consequences? It seems to have worked, I just changed a word in the warning log and it built in 5 seconds.

There is a known issue here that we’re planning to address for Rocket but haven’t gotten to it yet. Basically, UE4 is designed for HUGE games that have hundreds of source files, so the out-of-the-box settings are configured to get the best possible full recompile times with huge game code bases.

What’s happening with your one-file change is that Unreal Build Tool is globbing together that source file into a combined file with the other code files in your module, and also not bothering to generate (and cache!) a precompiled header for your game source since they all fit within a single combined source file.

As a workaround, to get the faster iterative times with small changes, please try the adding the following lines inside your game module’s Build.cs (MyGame.Build.cs):

_ MinFilesUsingPrecompiledHeaderOverride = 1;_
_ bFasterWithoutUnity = true;_
_ _
This will turn off combining of source files, and also tells Unreal Build Tool to always create a precompiled header, which will yield very fast iteration times.

Beyond this, we are also making changes to make Unreal Build Tool startup much more quickly.

Let us know how it goes.

–Mike

Privacy & Terms