Download

Wondering if I can even do this

While C++ is difficult for me, I’m sure I can learn it in time. What I can’t really deal with though is compile time. I’ve seen many members though trumpet the use of C++, and I’m wondering how they can work with 30+ second compile times for iterative changes.

I’m another possible Unity convert, mostly for the licensing terms and graphical power. But having to close the editor, edit my code, then wait for the recompile is proving to be untenable for me. I’m a lone developer with a low-to-midrange laptop (i7 quad-core 2.6gHz with hyperthreading). I can’t wait 30+ seconds every time I want to make a small change, and it’s becoming even more discouraging that this is happening with nearly blank games with nothing but camera code at the moment. Will this become worse and worse as my game grows in complexity?

Aside from the Build.cs fix which had no effect on my compile times, are there any other methods by which I can speed things up short of buying a new computer? Blueprints seem nice, but I’m running into the same issues I had with Playmaker before I learned C# - a lack of modules to do exactly what I need and it taking much longer to string together a complex node system to do what I could in three lines of code.

I know 30 seconds doesn’t sound that bad to some, but when you’re both learning C++ as you go AND learning the api it slows production to a near-standstill.

Any suggestions?

I was wondering this too. Several videos spend a lot of time waiting. I’m also in a similar spot. Haven’t decided between Unreal or Unity and haven’t subscribed to UE4 yet. I’m used to 1 or 2 second compilations for large projects, albeit not games. That luxury has conditioned me to where 3 second pauses would be unsettling. Continual 30 second pauses for minor changes would be pure torture.

Here’s some good news.

https://answers.unrealengine.com/questions/3647/how-to-improve-compile-times-for-a-c-project.html

Read the responses from Fricker and below. I suppose I’m willing to consider living with five-second meditations. That was a few months ago. It’d be good to know more, what it’s like for folks now. Gotta love the Unity pun:

[FONT=Courier New]bFasterWithoutUnity = true;

Ha, yeah. That was the first thread that came up during my primary research, but unfortunately that Build.cs trick doesn’t make any difference for me, as I referenced in my post. Does it work for you? I can’t tell if this was something you applied to your own project from your post. I was very excited to see some people getting a resultant 1/6th compile time, but benchmarking with a stopwatch I get no change. No improvement whatsoever from that fix :confused:

Edit: Nevermind, I see you haven’t subscribed yet! Can’t add code to code that doesn’t exist, heh.

I’m also having the same problem. The slow compiling times are discouraging and I’m forced to use Blueprints.

If compiles are this much of a headache for you guys then I think you ought to be looking at faster computers. Don’t get me wrong, I am learning C++ too and the compiles could be faster, but having a reasonably high end desktop goes a long way.

I’m by no means a computer science expert, but if the solution is seriously “MOAR GIGAHERTZ” then Epic isn’t going to give Unity the run for its money they seem to want.

Exactly.

I’d like to hear from Crafty and others about their average compile times and computer specs. I don’t mind long compiles at first to get things cached, perfectly fine. Admittedly, I’m obsessed with seeing immediate feedback. Less waiting is a serious relief. In Unity, there’s still enough waiting but it’s usually rather streamlined. If Unreal is a lot slower normally to give feedback, it’ll make me think twice. Blueprint is fast and solves this? Then that requires using Blueprint and not writing code? I thought Blueprint was just a GUI option to either create code on the same spaces and/or to view the flow of code one writes. Blueprint looks like a great visual aid and a big help to different people. I’d love it in the respect as a mere visual feedback of the flow, or to quickly change a variable here and there, but only if it doesn’t get in the way of writing code.

I’m on a Q9550, 8GB memory. It’s maybe outdated from ~5 years ago but still capable in other software that works the cores. If having modern components (~$350+ recent CPU, ~$350 recent GPU, 16GB, etc.) truly makes the difference – such as reducing constant pauses from 5-10 secs to 1-3 secs, or such – that could be understandable. I’d have to consider it eventually.

I haven’t used Unity but I considered it because it was much faster and was working fine on even low-range PCs. I sticked with Unreal because I like how their Engine is going in terms of visual appearance and the community. But the compile times really ruin for me as I’m more of a coding guy, so I’m kind of forced to use Blueprints until we get a better compile times.

I am considering buying a new computer, most likely high-ranged but I don’t know what PC I should buy that would allow me to work quickly and efficiently. It seems even some high-ranged PCs are having the same problems as us, which then makes it kinda of useless to buy a high-ranged PC when the only difference it would make is in graphics.

Does anyone here have a high-ranged PC with 1-3 second compile times?

Dunno if that is high ranked but on mine i5 4670 (4.4Ghz) and with 12GB ram (need more at least 24), compile time vary from 5 seconds to 15 mins. Depends on what I changed.

On average though I wait more for editor to open, that for code to compile.

How long does a hot compile take? I find it pretty discouraging that we need to buy 16GB+ worth of RAM, SSDs, and faster CPU in order to get faster compile times. Isn’t C++ suppose to be a quick language to work with anyways?

I’ve found the Modules recompile functions in the editor to help a lot with this, at least. It doesn’t fix the slow compile times, however.

It’s quick at runtime, not quick to optimize or compile ;).

Hot compile. I dunno I use it very rarerly, I very often add new classes and modify headers of existing ones.
Last time I checked it was about 30 seconds or so.

I have 16gb of ram and a 2.6gHz per core i7, so my computer isnt a slouch. The thing is that I spend a lot of time away from home, so I pretty much need to develop on a notebook. Notebooks with specs like some people call for however are $2000+ and I just can’t afford that at this moment in time. So it’s more than a little discouraging.

Hot compile in-editor is actually slower than closing the editor and recompiling from VS2013. My last compile was ~36 seconds. Last time I tried to hot compile it took over a minute before I got fed up and canceled it, then closed the editor and compiled from VS again.

C++ is usually much faster than other languages if your codebase is small, but Unreal’s codebase is humongous. When I compile small projects they compile much faster in C++ than the same project in C#, but as the codebase balloons so does compile time, it seems.

I really hope I’m just an idiot and I’m doing something wrong and an Epic staff member can help shed some light on us newbies.

So are all you guys compiling with full source code?
Since my compile time (Clean and Rebuild) takes. UBT execution time: 11,30 seconds

So if you are using full source and not changing some engine code, just use the library’s.
And just make any settings editable in the editor if possible.
For reference.
Processor: Genuine Intel(R) CPU @ 3.20GHz (12 CPUs), ~3.2GHz, Memory: 32768MB RAM
Available OS Memory: 32742MB RAM, Page File: 9068MB used, 56413MB available, GPU Card name: NVIDIA GeForce GTX 680

Thank you very much for your response! Can you be a little more specific about what you mean by that? Again, I’m a C++ noob, so this language is a bit outside my wheelhouse. My benchmarks were with the Code Side Scroller template, do you know if that uses just the libraries? Are you referring to using the Unreal VS extension and choosing just your game from the drop-down list?

In the end though your fast compile times might have something to do with having 12 CPUs lol

Hello what i mean is that if you only install the engine, and do not download the full source code.
You stile have access to the full API of the engine,“What do this mean?”

When Epic ship a version it has new DLL files and .lib files and the header files (.h).
This way code is pre-compiled for you when you start a code project,
it will use .lib files and/or link DLLs and use the headers for knowing about the compiled code. (Any project you create use these.)
This is how your project should look in Visual Studio.
project.JPGIf you have a UE 4 Solution there as well you are using the full source code.

Some reson you may have to use the full source code is to change engine code, make plugins, fix bugs or contribute.
Hope this helps, let me know if somthing is not clear.

Also take a look at Programming Guide > Development Setup > Setting Up Visual Studio for UE4

And yes HEX core also helps :slight_smile: hehe

So if we use the version with the source code, then we will have slower compile times? Is there a way to avoid compiling the Engine every time?

The simplest way is just not download the source code from GitHub.
And just start a new code project from the launcher.

That way you are only compiling the game module(s).

I want to corroborate this. I downloaded the compiled editor from the unreal site and compiled the same game code again and got a cool 13 seconds from VS to editor. That’s extremely reasonable, though I’d love any more improvements that could be made, of course.

I should point out that

MinFilesUsingPrecompiledHeaderOverride = 1;
bFasterWithoutUnity = true;

still made no appreciable difference in compile times for this particular project, in case anyone was wondering.

-Jared

Using a SSD should speed up compile times significantly.

When I was compiling something i could never see my CPU at 100% it was
always the HDD limiting the speed, cause of it’s bad access times and the
overall lower speed.