Compiling UE4.23.1 from source is taking up 90GB+ and growing each time I compile!!

Hi, I downloaded the UE4 source code the other night. After the first initial successful compile (which took 2 hours on a 16 thread RYZEN! what the hell?). I had 40GB left of free space on my ssd. After changing some code and hitting “build” I come back to an out of space SSD and a failed compile due to limited disk space.

I assume that if I hit “rebuild solution” which would clear all binary files… this would solve the disk space issue. However, I don’t want to wait another 2 hours for it to compile each time I modify something. Can somebody please help me with this?

There’s no way around it, you need another disk. Boxing Day sales should still be going.

Building the solution should overwrite the original binaries unless if the binaries are currently in use by the Game or Engine. If you modify the Engine module you should just select the Engine Project (UE4) and build that exclusively. You can also build the Game module exclusively. If you don’t want to use the debugger (breakpoints etc) then you could delete the pdb files to save some space but then you won’t know what happened when a crash occur.

100GB is like a minimum working with EU4 though.

Oh, I wasen’t aware that it takes up a min of 100GB. If that’s the case then I’ll live with it.

What concerns me is that I compiled the whole thing once… That gave me a project size of around 40gb I think. Then I modified a single file, hit “build UE4” and next thing my project is twice the size… Are you telling me that is normal? I was under the impression that any files that I change, it will clear and re-compile only the affected binary files. But it seems like it’s creating duplicate file data of the whole project each time or something.

So when I modify a single float value, it is normal to create an additional 40GB of data? I have a 9TB system, size is not the issue. It just appeared to me that something may be wrong with how I might have setup my visual studio. This was not something I’m used to seeing. But if there truly is “no way around it” then I’ll live with it.

If you stick to one Build Configuration the size should not increase. Note that when you open the Editor for the first time it will build the DerivedDataCache which takes up another 15 GB or so.

I have built the Development and Debug configuration of the engine and it uses 115GB, 30GB of binaries, 27GB of intermediate, 20GB of plugins and 19GB of source.

At the very least VS is going to make sure you have enough space for the project to be rebuilt before it starts. You wouldn’t want to find that out halfway through a very long build.

I’d suggest reading through all the recent VS2019 posts on the forum and getting that set up instead. It’s faster and probably does a better job with available space.

Ok, thanks for the additional information. I’m going to recompile the engine and hopefully the project size shouldn’t be too much bigger than 125gb. A bigger issue I think is trying to get Visual Studio to utilise all cores when compiling. Are you aware of the IncrediBuild plugin? It says that it significantly increases project compile times. If you’ve tried it, Are there claims accurate?

Incredibuild is almost a virus. It’s prohibitively expensive and if you have it installed and you’re not using it it’ll just be irritating. And you no longer need it if you’re talking about compiling on a single machine, only across the network. You can safely uninstall it with the VS installer though.

You can tell VS to just use more cores to build just by itself, but with UE you sometimes get file-in-use conflicts so I usually have mine left at 1 for engine builds. That’s in the settings somewhere.

I’m actually already using VS2019 and it didn’t check to see if I have enough space before I did the rebuild… Instead it just stopped half way through with no way to continue unless I restarted the whole process.

If there are any VS2019 specific “speed improvement” forum threads would you mind linking them to me?

Haven’t used IncrediBuild since I don’t build the entire Engine so often to justify the price tag. I normally just build the engine once and never modify it since I want to be able to upgrade without having to rewrite a lot of code. Any modifications I make are done by extending the existing classes whenever possible.
Building game and plugin modules only takes minutes and modifications takes like 10-20 seconds.

If you self admittedly “never modify it” (the engine code) then why to you build from source as opposed to downloading the pre-compiled version of the engine if you don’t mind me asking?

Is it using the VS2019 toolchain though? I forget how to check, but if you have 2017 installed it will use it unless you make it do otherwise. You have to set it up somehow but I haven’t done that yet.

Just have a look through this forum, there’s one here somewhere.

I recently uninstalled visual studio 2017. And I can’t find anything related to “setting the toolchain” on this forum. I find comments of people using it, but nobody is mentioning how to “set” it.
Anyway, since I’ve uninstalled Visual Studio 2017, I don’t think the whole “toolchain” thing applies to me.

It is possible to see which toolchain it’s using in the build output. I’d double check, as your engine should be compiling faster than that under 2019.

It is necessary to use the source build when you want to build a dedicated server or client build or make an un-optimized debug build and I occasionally make small changes to the engine but nothing major.

Oh yeah I forgot about the dedicated server stuff. Last time I was messing around with that was back on like UE4.8.

Yeah, It’s just finished compiling. It took 1h49m:

you can delete all *.pdb files from the all source. i did it and works fine!;base64