x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Extremely long build time

Hello! I am new in UE4 and I have a HUGE problem with build times.

I am following this course, and I am experiencing very and very big build times.

For example, I am on seventh video and now I have THIS solution structure alt text

I have a hot reload configured and I am using this build settings (as far I understand, I should build the project every time I make a change in C++ code, because it's the only way to have changes in editor). alt text

Now a quick test. I have my project, I go to ONE .cpp file and change only ONE ARGUMENT IN ONE FUNCTION. I click "UnrealVS Quick Build -> Development Editor" and I have this: alt text

What am I doing wrong? I beg you for help, because It can't be possible to waste so much time just for a small little change in code. I am really can't believe that this is normal. I really wan't to write C++ code, but with that slow workflow It feels impossible.

It is also takes about 1-2 minutes to CREATE new C++ class (derived from Actor, for example). It recompiles the project and doing other things.

I've made a fresh VS2017 and UE4 installation today but it didn't help at all! I read about IWYU and it seems it is ON bu default in my .cs file (PCHUsageMode.UseExplicitOrSharedPCHs).

My specs: - i5 4690K - GTX 970 - 8GB of RAM - Win 10 (up-to-date)

Product Version: UE 4.18
Tags:
снимок.jpg (35.4 kB)
снимок1.jpg (24.0 kB)
снимок3.jpg (22.4 kB)
more ▼

asked Dec 16 '17 at 05:52 PM in Packaging & Deployment

avatar image

featurekiller
1 1 2 3

avatar image featurekiller Dec 17 '17 at 11:32 PM

I've made some observations: when I am editing header file it takes a few minutes to apply changes and make a hot build (I am using Development Editor build option).

When I am changing some .cpp files, it takes only 2-10s to hot build with the same options.

It's strange, because I am changing only 1 game header file, and only 1 .cpp file has that file dependency.

What's with PCH? It seems I've got a bug.

UPD: No, it seems that was a random behaviour. Now my build with one edited .cpp file took 288 seconds.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Ok. Slow compile times were because of RAM. Close your browser and free ~3 GB of ram. It will be very fast.

I don't understand that behaviour, because there is no warnings and messages about your RAM. It's silently increasing compile time and stop using all available RAM. I think because it's trying not to hang up your PC.

more ▼

answered Dec 18 '17 at 12:25 PM

avatar image

featurekiller
1 1 2 3

(comments are locked)
10|2000 characters needed characters left

Hey there, i'm not sure if it helps, but i've never used that, i've always used the Compile button in the editor to hot reload and unless you are changing some core stuff in the header file usually it works without having to restart the engine and it's decently fast.

more ▼

answered Dec 16 '17 at 08:15 PM

avatar image

xlar8or
5.9k 152 126 300

avatar image featurekiller Dec 16 '17 at 08:45 PM

It doesn't help at all. Almost the same results :(

avatar image xlar8or Dec 16 '17 at 09:59 PM

Try deleting the intermediate, binaries, saved folder, regenerate the visual studio project from the uproject and try recompiling all over again to see if it makes a difference.

avatar image featurekiller Dec 17 '17 at 12:41 PM

I deleted the Engine folder and now build time is about 5-10 seconds. But, do I really need the Engine folder? It seems that all people who makes tutorials have the Engine folder and their compile time is fast.

I think they have Engine folder removed from build settings, but it didn't helped me. Only complete deletion from the solution makes sense.

avatar image xlar8or Dec 17 '17 at 01:38 PM

I never had a Engine folder created in the project directory, but if that works for you then great, the main question is for how long.

avatar image featurekiller Dec 17 '17 at 04:33 PM

The Engine folder isn't in the project folder. It's only in solution as a second projects.

I don't know for how long and I don't know why it's even in my solution.

avatar image Ego Studio Dec 17 '17 at 03:17 PM

Build to 64 bit looks like extremely long, I only build to 32 bit now. Maybe you can try building to 32 bit and see if that works.

avatar image xlar8or Dec 17 '17 at 03:38 PM

So is the issue fixed?

avatar image Ego Studio Dec 17 '17 at 03:55 PM

Building in 32 bit is way much faster. Deleting folders may not be a good idea.

avatar image featurekiller Dec 17 '17 at 04:36 PM

Win32 is not a supported platform for Project. Valid platforms are Win64.

No, I can't do 32bit build because I have x64 project. This is not a good idea.

avatar image Ego Studio Dec 17 '17 at 05:06 PM

In this case, it's different if you have to do it with 64. I guess you have to be patient.

avatar image featurekiller Dec 17 '17 at 05:12 PM

To be patient and to wait for 200+ seconds every time I want to make a change or to learn how to write code in C++ for Unreal? Huh, but it's not worth it.

I still think that that compile time is not how it should be. It's OK if my project were 100+ files big, but seriously, even the template TopDown example compiles for about 3-5 minutes every time I touch even one line of code.

avatar image xlar8or Dec 17 '17 at 05:16 PM

Yes that is not normal, i have a much more complex project and it takes like 30 seconds the hot reload.

avatar image featurekiller Dec 17 '17 at 05:54 PM

So it seems that both VS17 and UE4 recompiles ENGINE with every code change.

It happens even if I am excluding UE4 project in build settings. It happens even if I am rightclick on MyProject and only building IT.

And it seems that if I delete ENGINE folder (with UE4 project) from solution, it will be added every time when I Refresh project with UnrealVS tool.

So It looks like ProjectFileGenerator executes with -Engine flag. But I don't know how to make all my projects to creating without -Engine flag.

I don't need Engine source files and why the hell it adds them for me by default?

avatar image Ego Studio Dec 17 '17 at 05:26 PM

Oh sorry, you were talking about Compiling time not Package Build time. With Blueprint you have to go to Editor preference and uncheck Compile Manager. With C++ I guess there is something like this.

avatar image featurekiller Dec 17 '17 at 05:37 PM

I've already unchecked that.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question