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"

Slow build time with UE 4.15

Since I transitionned our project to UE 4.15 I experience very long time to build the project, even when I just update the CPP file.

With the in 4.14.3 in took less than 16 seconds...

Now in 4.15, the same build takes around 55 seconds.

What I changed in the code base was to remove the include to engine.h in our main header file, and replaced that line by CoreMinimal.h. I also added a few includes in the game code where needed.

I tried to play with the flag bEnforceIWYU in the build.cs file, but either true and false make the build last much longer...

I also have this error in the log of visual studio 2015 when I build:

[QUOTE]ERROR : UBT error : Failed to produce item: C:\Projects\xxx\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-xxx-9618.lib[/QUOTE]

This does not prevent the editor from successfully hot-reloading the code, but when I attach VS to the editor I can't step in the code like I could do in UE 4.14.

Are there any more steps to take advantage of the IWYU feature?

Thanks!

Product Version: UE 4.15
Tags:
more ▼

asked Mar 02 '17 at 01:01 PM in Bug Reports

avatar image

Zoubi
172 22 30 35

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Hello Zoubi,

There was an issue related to IWYU causing problems for plugins recently as it's not on by default for Game configurations. I'm not sure if you're having the same issue with your project but try adding this to your .build.cs:

PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs

more ▼

answered Mar 02 '17 at 09:23 PM

avatar image Zoubi Mar 03 '17 at 10:46 AM

Hello Matthew,

thanks for your comment. It did indeed fixed the slow build issue. We now have around 20% faster build times, as expected.

Nonetheless we have an error when we build the game while the editor is running. Here is the log:

 1>------ Build started: Project: MyGame, Configuration: Development_Editor x64 ------
 1>  Compiling game modules for hot reload
 1>  Performing 3 actions (4 in parallel)
 1>  Module.MyGame.cpp
 1>  [2/3] Link UE4Editor-MyGame-6199.dll
 1>  [3/3] Link UE4Editor-MyGame-971.lib
 1>     Creating library C:\Projects\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-6199.lib and object C:\Projects\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-6199.exp
 1>     Creating library C:\Projects\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-6199.suppressed.lib and object C:\Projects\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-6199.suppressed.exp
 1>ERROR : UBT error : Failed to produce item: C:\Projects\MyGame\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-MyGame-971.lib
 1>  Total build time: 14.81 seconds (Local executor: 0.00 seconds)
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(37,5): error MSB3075: The command ""C:\Program Files\Epic Games\4.15\Engine\Build\BatchFiles\Build.bat" MyGameEditor Win64 Development "C:\Projects\MyGame\MyGame.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Note that it does not prevent the editor from successfully loading the new DLL, and apparently it does not prevent me to put breakpoints and step in the code when I attach the debugger to the editor.

avatar image Matthew J Mar 03 '17 at 02:46 PM

If the compiling is actually successfully completing and it's just that Visual Studio is throwing errors, it should be a symptom of this bug: UE-42205.

avatar image Zoubi Mar 03 '17 at 04:33 PM

yes it's the behaviour I have right now

avatar image tormit Jun 21 '17 at 10:50 PM

Hi,

I have PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs set, but it's still about twice slower than before enabling IWYU. Using 4.15.3.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I fixed it by: - Put these 2 lines in yourGame.Build.cs PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bFasterWithoutUnity = true; - MAKE sure you follow all the recomendations/tips in https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/

  • Do not use "Compile" buton inside Editor but click "Build" your game project inside visual studio while editor open, it will hot reload it automatically once done.

more ▼

answered Sep 13 '17 at 03:42 PM

avatar image

phungdinhdung
6 1 2 5

avatar image KingVario Oct 25 '17 at 06:25 PM

This isnt working im getting insanely high compile times, 22-25 seconds for changing a float variable. PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; bFasterWithoutUnity = true;

I already run on 2x SSD's fx8300 4.2ghz, 12gb ram, editor installed on 1 SSD and project on other SSD still im not I/O bottlenecked its the build process that is slow.

avatar image KingVario Oct 25 '17 at 06:34 PM

Ok it got better after doing this: "If you need to access UEngine or GEngine, which are defined in Runtime\Engine\Classes\Engine\Engine.h, you can #include Engine/Engine.h (distinguishing from the monolithic header file, which is located at Runtime\Engine\Public\Engine.h). "

Now i get 11.8 seconds build on chaning variables etc, still slow but workable.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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