UE4 has been compiling C++ code for over 20 minutes now, is this normal?

Hi I’m following the video and when attempting to compile in vscode, the UE4 shows a message saying “compiling c++ code”, but it’s been there for 20 minutes now. Is this normal?

After doing the stuff that’s listed on the slow compile times video, I finally got it to compile, but still 30 minutes for one single compilation is madness. What can be done to improve these times? Thanks!

Hi there,
I too had similar issue, please see the lesson ‘Solving Slow Compile Times’. It did help me reducing the time.
Thanks!

Hi, thanks, but as I mentioned, I already did the stuff suggested at “solving slow compile times”, and it did bring the compilation time down to 30 minutes, which is unacceptable, in my opinion.

Hi, sorry I missed that. Not sure whats causing this, sounds like a different issue.

Sorry I don’t know what can solve your specific problem, but this is definitely not normal. C++ takes long time to compile, but not that long for this small project. Unless you have really slow CPU and HDD (or not having enough RAM or swap space).

Hi, thanks for the comment. I’m running on an Intel iCore 7 @2.6 GHz, with 8GB of ram. As far as I can tell, those are the specs required to run Unreal… I do have a HDD as opposed to an SSD, but that didn’t show up in Unreal’s specification as a requirement. I’ve been using this laptop with Visual Studio 2019 enterprise to develop (professionally) huge C# projects, without any problems, and even C++ projects on VC++ do compile quick enough (for a C++ project) so am really at a loss here, as to why Unreal would take that much time.

As you know - C# is totally different beast to compile than C++, so the comparison is not indicative of anything. Though I do miss sometimes unity, with it fast compile times :smiley:

SSD is not required, but it speeds up everything a lot (I have small SSD and HDD and when I work on a project I try to have it on SSD - the work comfort is so much better).

Seems that your CPU and RAM are meeting Unreal requirements.

Aside from checking memory and page file utilization (it seems you keep the project on C: drive and also windows usually have page file there; this + huge caches from unreal could have taken too much space on C:, but I’m guessing blindly right now) I don’t have ideas. I hope someone else can help you out. Maybe one of TAs will be able to support you.

Is there a way you could share your project, Fernando? I’ll run it on my rig and see if we can rule out hardware issues.

Well, curious, I attempted with VS2019 and it happened the same. After digging a bit, it seems Unreal uses VS2019 or VSCode as just code editors. So I closed VSCode and VS2019, and started using Notepad++ and the compilation time was reduced to two minutes. My current guess is that either IDE is perhaps blocking access or locking something UE4 needs to perform its compilation.

Using an SSD is definitely needed for better compile times.

I have a Ryzen 3700X and previously had my Engine on an SSD and my projects on HDD. I was getting anywhere from seconds to 10min compile times, rebuilding was somehow often faster with 40s to 5min compile times.

Now that I have moved (most) projects to an SSD I’m getting consistent compile times of under a minute, typically under 10s.

Yes, but SSD is not needed for Unreal, at least with their specs, and it doesn’t appear in the course’s specification either, so I’m guessing that overall, it shouldn’t be an issue.

I didn’t say it was needed. I said it was needed for better compile times.

I didn’t say you have said it was needed. I was pointing out that such comment didn’t help to solve my problem.

Hi FG - If you have not already checked your Antivirus and/or any automated system tools like syncing tools that “could” be doing file locking - you may have to allow permissions for VS - or in my own case Stop/turn off my NAS file syncing app. You didn’t mention if the compile ever finished in VS - if file locking is the issue - it will never complete…
GL&HF
K

Privacy & Terms