15 minute compile time after hot compile

Engine: UE 4.7.0 (with engine source)

Issue: Compiling my game in visual studio takes about 15-20 minutes after performing a hot compile.

Repro steps:

  1. Create a C++ project with source code.
  2. Build your game from the source code and let the editor open it up. This should take about 2 minutes maximum.
  3. Create a blueprint which inherits from a C++ class
  4. Modify the underlying C++ class and save the file in visual studio
  5. Within the editor, use the Hot Compile button to compile the class changes. This should take around 10 seconds.
  6. Shut down the editor and go back to visual studio
  7. Right click on your project and select “Debug → Start new instance”
  8. Visual studio will build the project and it will take about 15-20 minutes as it rebuilds 74 different libraries which have nothing to do with any game project changes. It is not performing a full engine recompile (which takes 55 minutes).

Here’s something else I’ve noticed:

If I never use the hot compile and just exit back to visual studio and rebuild the game, it always takes about 60-120 seconds. It’s quite fast, relatively speaking.

Right now, I have to choose between whether I want to use the hot compile and risk an editor crash plus a rebuild which takes 15-20 minutes, or just spend the 2 minutes per code change.
This becomes a bit of an iteration issue when the hot compile fails, and the time cost is pretty bad for iterating quickly over changes.

Ideally, I’d use the hot compile as much as possible, until it crashes the editor somehow, and then when that happens, just rebuild using visual studio and be back up and running in 2 minutes.


Here is my build order log (17 minues, 45 seconds):

1>------ Build started: Project: MageMaster2, Configuration: DebugGame_Editor x64 ------
1>  Parsing headers for MageMaster2Editor
1>  Reflection code generated for MageMaster2Editor
1>  Deleting old hot reload file: "C:\Users\Eric\Documents\Unreal Projects\MageMaster2\Binaries\Win64\UE4Editor-MageMaster2-5785-Win64-DebugGame.dll".
1>  Deleting old hot reload file: "C:\Users\Eric\Documents\Unreal Projects\MageMaster2\Binaries\Win64\UE4Editor-MageMaster2-5785-Win64-DebugGame.pdb".
1>  Performing 74 actions (4 in parallel)
1>  Slate.generated.cpp
1>  CoreUObject.generated.cpp
1>  InputCore.generated.cpp
1>  SlateCore.generated.cpp
1>  [5/74] Link UE4Editor-CoreUObject.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-CoreUObject.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-CoreUObject.exp
1>  UnrealEd.generated.cpp
1>  EngineMessages.generated.cpp
1>  [8/74] Link UE4Editor-EngineMessages.dll
1>  [9/74] Link UE4Editor-InputCore.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EngineMessages.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EngineMessages.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-InputCore.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-InputCore.exp
1>  EngineSettings.generated.cpp
1>  Landscape.generated.cpp
1>  AIModule.generated.cpp
1>  [13/74] Link UE4Editor-SlateCore.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SlateCore.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SlateCore.exp
1>  [14/74] Link UE4Editor-Slate.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Slate.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Slate.exp
1>  Kismet.generated.cpp
1>  [16/74] Link UE4Editor-EngineSettings.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EngineSettings.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EngineSettings.exp
1>  [17/74] Link UE4Editor-Kismet.lib
1>  [18/74] Link UE4Editor-AIModule.lib
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIModule.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIModule.exp
1>  Engine.generated.1.cpp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Kismet.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Kismet.exp
1>  Engine.generated.2.cpp
1>  [21/74] Link UE4Editor-Landscape.lib
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Landscape.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Landscape.exp
1>  Engine.generated.5.cpp
1>  [23/74] Link UE4Editor-UnrealEd.lib
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEd.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEd.exp
1>  Engine.generated.4.cpp
1>  Engine.generated.3.cpp
1>  EditorStyle.generated.cpp
1>  TextureEditor.generated.cpp
1>  WidgetCarousel.generated.cpp
1>  [29/74] Link UE4Editor-Engine.dll
1>  [30/74] Link UE4Editor-EditorStyle.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EditorStyle.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-EditorStyle.exp
1>  Foliage.generated.cpp
1>  SourceCodeAccess.generated.cpp
1>  [33/74] Link UE4Editor-SourceCodeAccess.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SourceCodeAccess.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SourceCodeAccess.exp
1>  GraphEditor.generated.cpp
1>  [35/74] Link UE4Editor-WidgetCarousel.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-WidgetCarousel.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-WidgetCarousel.exp
1>  BlueprintGraph.generated.cpp
1>  AnimGraph.generated.cpp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Engine.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Engine.exp
1>  OnlineSubsystem.generated.cpp
1>  SceneOutliner.generated.cpp
1>  [40/74] Link UE4Editor-GraphEditor.lib
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GraphEditor.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GraphEditor.exp
1>  StatsViewer.generated.cpp
1>  NewsFeed.generated.cpp
1>  AutomationMessages.generated.cpp
1>  [44/74] Link UE4Editor-AutomationMessages.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AutomationMessages.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AutomationMessages.exp
1>  [45/74] Link UE4Editor-OnlineSubsystem.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystem.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystem.exp
1>  UnrealEdMessages.generated.cpp
1>  [47/74] Link UE4Editor-UnrealEdMessages.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEdMessages.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEdMessages.exp
1>  GameplayTags.generated.cpp
1>  SessionMessages.generated.cpp
1>  [50/74] Link UE4Editor-SessionMessages.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SessionMessages.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SessionMessages.exp
1>  InternationalizationSettings.generated.cpp
1>  OnlineSubsystemUtils.generated.cpp
1>  SwarmInterface.generated.cpp
1>  TargetDeviceServices.generated.cpp
1>  OnlineBlueprintSupport.generated.cpp
1>  [56/74] Link UE4Editor-TargetDeviceServices.dll
1>  [57/74] Link UE4Editor-SwarmInterface.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-TargetDeviceServices.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-TargetDeviceServices.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SwarmInterface.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SwarmInterface.exp
1>  [58/74] Link UE4Editor-Foliage.dll
1>  [59/74] Link UE4Editor-TextureEditor.dll
1>  [60/74] Link UE4Editor-BlueprintGraph.dll
1>  [61/74] Link UE4Editor-SceneOutliner.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-TextureEditor.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-TextureEditor.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SceneOutliner.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-SceneOutliner.exp
1>  [62/74] Link UE4Editor-NewsFeed.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BlueprintGraph.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-BlueprintGraph.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Foliage.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Foliage.exp
1>  [63/74] Link UE4Editor-StatsViewer.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-NewsFeed.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-NewsFeed.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-StatsViewer.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-StatsViewer.exp
1>  [64/74] Link UE4Editor-GameplayTags.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GameplayTags.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GameplayTags.exp
1>  [65/74] Link UE4Editor-InternationalizationSettings.dll
1>  [66/74] Link UE4Editor-OnlineSubsystemUtils.dll
1>  [67/74] Link UE4Editor-Landscape.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-InternationalizationSettings.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-InternationalizationSettings.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystemUtils.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineSubsystemUtils.exp
1>  [68/74] Link UE4Editor-AIModule.dll
1>  [69/74] Link UE4Editor-MageMaster2-Win64-DebugGame.dll
1>  [70/74] Link UE4Editor-AnimGraph.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AnimGraph.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AnimGraph.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Landscape.lib.suppressed and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Landscape.lib.exp
1>     Creating library C:\Users\Eric\Documents\Unreal Projects\MageMaster2\Intermediate\Build\Win64\MageMaster2Editor\DebugGame\UE4Editor-MageMaster2-Win64-DebugGame.lib and object C:\Users\Eric\Documents\Unreal Projects\MageMaster2\Intermediate\Build\Win64\MageMaster2Editor\DebugGame\UE4Editor-MageMaster2-Win64-DebugGame.exp
1>  [71/74] Link UE4Editor-OnlineBlueprintSupport.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineBlueprintSupport.lib and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-OnlineBlueprintSupport.exp
1>  [72/74] Link UE4Editor-Kismet.dll
1>  [73/74] Link UE4Editor-UnrealEd.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIModule.lib.suppressed and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-AIModule.lib.exp
1>  [74/74] Link UE4Editor-GraphEditor.dll
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Kismet.lib.suppressed and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Kismet.lib.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GraphEditor.lib.suppressed and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-GraphEditor.lib.exp
1>     Creating library C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEd.lib.suppressed and object C:\Users\Eric\Documents\Visual Studio 2013\Projects\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-UnrealEd.lib.exp
1>  -------- End Detailed Actions Stats -----------------------------------------------------------
1>  Total build time: 1066.84 seconds
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

Hi Slayemin,

I tried to reproduce the issue that you described in version 4.7.0, but was unable to see any lengthy compile times. This was the result of the build at step 8 of your repro steps:

1>------ Build started: Project: TestLongCompile2, Configuration: DebugGame_Editor x64 ------
1>  EMSCRIPTEN sdk 1.22.0 found which is older than 1250 Please install the latest emscripten SDK
1>  EMSCRIPTEN sdk 1.22.0 found which is older than 1250 Please install the latest emscripten SDK
1>  Deleting old hot reload file: "C:\Users\.\Documents\Unreal Projects\TestLongCompile2\Binaries\Win64\UE4Editor-TestLongCompile2-3611-Win64-DebugGame.dll".
1>  Deleting old hot reload file: "C:\Users\.\Documents\Unreal Projects\TestLongCompile2\Binaries\Win64\UE4Editor-TestLongCompile2-3611-Win64-DebugGame.pdb".
1>  Initializing...
1>  --------------------Project: Default-------------------------------------------
1>  UE4Editor-TestLongCompile2-Win64-DebugGame.dll (0:00.53 at +0:00)
1>     Creating library C:\Users\.\Documents\Unreal Projects\TestLongCompile2\Intermediate\Build\Win64\TestLongCompile2Editor\DebugGame\UE4Editor-TestLongCompile2-Win64-DebugGame.lib and object C:\Users\.\Documents\Unreal Projects\TestLongCompile2\Intermediate\Build\Win64\TestLongCompile2Editor\DebugGame\UE4Editor-TestLongCompile2-Win64-DebugGame.exp
1>   
1>  ---------------------- Done ----------------------
1>   
1>      Rebuild All: 1 succeeded, 0 failed, 0 skipped
1>  
1>  
1>  XGE execution time: 13.82 seconds
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

The only thing that is rebuilt for me is the project library. Are you seeing long compile times in every project? Do you see the same lengthy compile time of all of those libraries if you right-click on the project and select Build in step 7?

Hey ,

I’m still getting long compile times. I’ve changed my workflow to avoid using the hot compile since there is a high that it fails and crashes UE4, which then causes the 15 minute recompile. I think one of the key steps in the repro process is to get the hot compile to crash UE4 somehow, then try to build the project again from game source.

If I completely avoid the hot compile, my compile times are less than two minutes in visual studio.
If I right click on my project and select “clean” or “rebuild”, everything gets cleaned instead of just my game’s intermediate files. This causes a recompile of the whole engine, all programs, and then my game, which takes about 55-75 minutes (which is currently happening right now).

I should also mention that I’ve got the full source from github and followed all of the documented instructions here: Compiling Game Projects in Unreal Engine Using C++ | Unreal Engine 5.1 Documentation

I’m using Visual Studio 2013 Community edition (out of the box) and have no additional extensions installed.

I’m almost wondering if there is some sort of configuration setting I’m missing or something wrong with my build process?

I have not tried this with other projects yet, but I can give it a shot if that would help you isolate the cause of the issue.

I do see the same libraries get rebuilt every time I get the lengthy compile process. Pretty much, every time I build and see that the build process has 74 actions to perform, I go get a cup of coffee or something.

I was just able to reproduce this issue again. I didn’t even need to crash UE4, I just needed to have a syntax error in my code. This caused the hot compile to fail, and then the visual studio recompile takes about 18 minutes.

Here is an attachment of my build output

Appreciate the help :slight_smile:

I am still having some trouble seeing a lengthy compile. Let me try to outline what I am doing specifically and you can point out anywhere I am doing something differently from you.

  1. Create a new code project using the First Person template (4.7.0 built from source code).
  2. Build the project in Visual Studio.
  3. Right-click on the project in VS and start a new debug instance.
  4. Click Yes when prompted to compile the project.
  5. Once the project is opened in the Editor, add a new code class to the project that derives from Actor.
  6. Once the Editor finishes compiling the new class, create a Blueprint from that class.
  7. In Visual Studio, add the following code to the header file so that the compile in the Editor will fail: void TestFunction;
  8. Click Compile in the Editor.
  9. Once the hot compile fails, close the Editor to exit the debug instance.
  10. Correct the new line of code in step 7 to void TestFunction();
  11. Right-click on the project in Visual Studio and start a new debug instance.
  12. Click Yes when prompted to compile the project.

The compiles in steps 4 and 12 both took about the same time to complete (roughly 20-30 seconds). Have you had a to see if this same behavior occurs in other projects as well?

With regards to rebuilding the project also rebuilding the Engine, this is somewhat expected. Visual Studio not only rebuilds the project, but also anything the project depends on, which includes the Engine. If you ever find yourself wanting to perform a rebuild of your project, my suggestion would be to delete the Binary and Intermediate folders from your project in Windows Explorer, then right-click on the .uproject file and select the Generate Visual Studio project files option. Then open the project in Visual Studio and select the option to build the project.

Hey ,

Your steps look about right. I did a lot more rigorous testing and I think I was able to narrow down the problem a bit. It’s certainly a hot compile issue and the long build times are related to the visual studio project file including the engine source.

I created a new C++ project with engine code and was able to successfully reproduce the issues (though, with 21 build items instead of the 74 I was seeing). From my testing, I found it doesn’t even matter if I include a syntax error in the hot compile, all that matters is that I use the hot compile and then go back to visual studio and try to build.

I have included a log of all of each step I took and the build outputs which resulted from each step.

link text

I just tried again using the outline you provided (that was great, thank you!). Unfortunately I still cannot reproduce the long compile times after a hot compile in the Editor. Something is causing all of those engine files to be marked dirty and needing to be recompiled. I don’t see anything that would indicate Visual Studio is the culprit, but I would be curious to see your Build and Run settings there (mine are below for comparison).

I am also running all of my tests on Visual Studio 2013 Professional. This should be the same as the Community version, but you never can tell. I have the Community version installed on my personal computer, so I may try running this test again there just to see what happens.

Hey ,

Here is a screen shot of my build settings.

It looks like they’re very similar to yours. I’m curious to know whether the problem is a visual studio community edition issue, though my suspicions say that it is a hot compile related issue.

I spent the last day and a half upgrading my version of the engine to 4.7.3 to see if that would fix the hot compile issues. The results are mixed. I followed my repro steps to see if I could cause a long recompile after a hot compile. The good news is that visual studio did not take 15 minutes to rebuild! Instead, it took about 20 seconds, which is perfect. The bad news is that the hot compile now takes about 150 seconds for the very first compilation, then about 10 seconds for each successive compile. I think I can live with that. I won’t be able to repro the old issue anymore, so I can’t track down and isolate the root source of the problem.

I’ve [uploaded my build log][2] for the new hot compile times with 4.7.3 (release) so you can compare my experience with yours.

I’m glad to hear that things seem to be moving in a generally positive direction for you in relation to this issue. I am somewhat hesitant to call this one resolved since I was unable to reproduce the issue myself. I think we can give this a few more days to make sure things don’t get bad again, then wrap this one up.

I wasn’t able to get this tested this weekend on my personal computer, unfortunately. I realized that I have 4.6.1 currently installed there, not 4.7.0 like I thought I had. Unfortunately my computer is several years old and building the Engine is quite an effort (I would be very happy to see 45 minute Engine builds that some users have reported). I’ll try to get updated to 4.7.0 sometime this week so I can try this on VS Community, though.

Hi Slayemin,

Since we haven’t heard from you for a few days, I am guessing that things are still going well. I am going to mark this post as resolved, but please feel free to re-open this post if necessary.

We also continue to make improvements to the hot reload functionality. You should see this area get better over time.