Reducing source code compile time


I am trying to alter the source code of the Unreal engine and the biggest problem for me is that compilation takes 2-15 minutes every time I want to test my changes.

I want to find out the best way to reduce the compilation time, so I was considering buying a better system to work off of (or perhaps just a better CPU), I wanted to get a second opinion about buying hardware.

I ran some tests on my PC and another better PC for comparison.

My PC’s Specs:
CPU: Intel i7-4820K 4 cores, 8 threads 3.7GHz base, 3.9GHz overclocked (it isn’t overclocked atm)
SSD: Micron-M550

I just tested out a better machine to see the difference in time, the compilation took roughly half of the time which wasn’t too surprising as it was running 12 parallel processes as opposed to the 4 of my current PC.
Specs (the CPU was overclocked):

I am considering buying a similar system because it seems to be the best way to reduce compilation time, if anyone has any other hardware suggestions (hopefully nothing too crazy in price but I’m open to all suggestions if they are worth it) I would appreciate it.

If anyone has any tips for decreasing the compilation time via software I’m open to all suggestions

I also noticed that with both PCs in Visual Studios it will always use [Max Number of Threads - 4] threads, is there something I can do so that it will use all of the threads?

Thanks for any advice.

Just to clarify, you mean engine-engine or game module on a customised engine?

I pretty sure you mean the actual engine (given “the source code of the Unreal engine”), but just in case.

Yeah, the actual engine code

Hello Chuman,
If you work in team you can share compilation task between multiple pc and parallized them.
Do you know Incredibuild? Is a tool for Visual Studio that can reduce compilation time.

Hi DaxDeveloper

I have access to a couple of machines that I can potentially parallize, I hadn’t heard of Incredibuild but after looking into it seems interesting but it is quite expensive, I have little experience with parallized computation so I have a couple questions if you don’t mind answering. Do you know how much of a benefit I would get from adding 4 cores from a seperate machine (the free version) at lets say 3.7GHz i.e.if I do decide to get a new machine, using my old machine parallized would be worth while? And how efficient would the work being done on the remote CPU be roughly, because I imagine that some speed is lost over the network communication?


Sure, If you have a new machine you can use your old one as a second machine build. Generally if you work in a lan (that means velocity of 1 Gb) you don’t be worry about network communication because is irrilevant. It’s difficult estamate the benefit that you can achieve with a parellel solution, i think that in the better case you car reduce compile time at 20%.