Very slow compile times even after fix

Even after the fix shown in lecture 51, I am having very slow compile times which surprises me because, yes although my computer specs aren’t great, they should be enough according to unreal documentation, here they are:

CPU Intel® Core™ i5-8300H CPU @ 2.30GHz (4 cores)
Graphics card: NVIDIA GeForce GTX 1050
Ram: 8GB

My compile times are consistently around 5min+ even when I make tiny changes such as adding a “PrintLine”. Here fore example, it took me more than 5min

At this point I’m spending more time compiling my code to see if it works than actually learning code.
Buying a new computer is not an option for now, neither is changing the components of mine since I have a laptop and wouldn’t be able to change anything without destroying it probably, especially as I have no knowledge of how to manually build a computer. I’d also like to avoid buying an SSD, but anyway there must be more to it than that. I’m really surprised the Unreal engine should take so much time to compile, I’m sure other people on this course are running lower specs than me and can compile in reasonable times.

It is what it is. There will be compile times since it has to compile and those times will fluctuate as you work on the project.

Your CPU isn’t bad (but also far from great today) and code compilation is heavily dependent on that. My CPU will compile about 2x faster than yours and mine is getting older. There’s regular CPU’s now that should compile 6-7x faster than yours.

The only thing I will do at times for compilation is adjust cores for compilation if the default usage is lower than the amount of cores (eg on Linux make -jx (x being number of cores - this it not for you. Just an example of what I mean).

So you check if you see all the threads being used during compilation with UE4 through performance monitor. If they are then there’s really nothing you can do except chop the stuff UE4 has to do down to less and/or lower quality or upgrade your computer. You might be able to find something but you might also just be chasing the wind.

How much time you waste on it is up to you. Drive speed may also improve times. Cache for compilation can improve additional compilation speeds which I believe is enabled for everyone but I barely looked at that. Etc. You can get as nuts about it as you want.

You can also adjust how you do it so just compile less and do the other stuff more.

Thanks for the quick reply!

Well that’s depressing :sob: should I give up on unreal and stick to unity then with my computer for now? One thing I haven’t done yet is to check if all cores are being used during compilation, don’t know how I can check that or to change the number of cores being used. The only thing I can tell you is that according to my nitrosense app, my CPU usage varies around 20% for compilations but it tends to fluctuate a lot, rarely goes above 30% though, so don’t know if that means anything.

If I were to get a new computer in the future for unreal, what specs would you recommend for good compilation times, and more generally good workflow without or little waiting around to do?

Should be about 12.5% per thread since your CPU has 8 threads. So it could be using all threads lightly or a few threads maxed. Either way, the CPU itseelf isn’t the bottleneck for you. UE is definitely using more than 1 thread though.

If you can make it use the CPU more heavily, that’s going to be determined by what you find if you keep trying to shorten the time.

Throwing hardware at it will only do so much. You could spend a lot of money to get it as short as possible. But, if Epic changes it, or you include more to do in the project, or whatever, the times could still go up or down as well. Better hardware only does so much but it will make it more tolerable than lesser hardware.

The cost of hardware to throw at it is going to be determined by several things. The amount you want to spend, the size of the project you want to make, the speed you want. I can’t really determine that for you. In my opinion what you have now is fine. I don’t have a problem with those times. Programming and game design equals lots of time. They eat time for breakfast. I would say just get used to it.

Some things on UE and CPU usage:

https://answers.unrealengine.com/questions/164573/how-many-cores-does-ue4-support.html

The second link people use to cut CPU usage down though that should also force it to use the CPU as much as possible as well if it didn’t happen to be already.

I likely won’t be continuing in this thread with you past this post. Like I said, I view your times as fine. Going down that rabbit hole isn’t worth it to me.

I can also can show you compilations that will drive you nuts if only 5 minutes does :wink:

Hope you find something or make peace with the times :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms