Conflict Unreal Editor and Visual Studio?

Hello everybody,

I have very long compile time for project 300+ seconds.
There is no problem if I open the Unreal Editor, edit the code in a text editor (notepad++) and click hot reload. Compilation in 20 seconds.

But when I open the Visual Studio 2015, it feels like one of the process blocks one another, the compilation in the studio and the editor becomes unbearably long. IntelliSense is disabled, there are no background processes.

Can you give me some advice? I would not like to codding in a text editor)

i had the same problem since 4.15, but mostly the first time compile after opening vs2015 takes 300+ sec, after that it compile fast for a while, but it happend again after some time.

I copied the project to my SSD, now it is always fast. Befor it was on an old Sata HDD

My guess is that you may be including too many classes, to fix this you have to sit down and spend some time checking who is including what, make a UML map of this and try to clean it up as much as you can, do not include classes on the headers (to get around that use forward declarations) and include what you use. Now a good question is why is the compilation process faster when modifying the file using a text editor (my guess is that the Unreal Header Tool may not go through all the related classes since it doesn’t recognize a change in the file), I’d love someone to come in and teach me on this ^^.

Wow, I have redesigned the project to IWYU as in this article, and now compiles realy fast 5-15 seconds!
Compilation from the studio and the editor works and there is no conflict.

https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/IWYUReferenceGuide/index.html

in a nutshell:

1_ Turn on the mode in .Build.cs

PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

2_ *.cpp files include their matching *.h files first.

3_ Remove YourProject.h from all sources, now heavy Engine.h does not participate in their compilation

4_ Optional сhange the #include “Engine.h” to “EngineMinimal.h” in YourProject.h

5_ Profit!

The compilation is really fast, thank you epic!

See my answer!