Hello Unreal Community,
I have started using UE4 recently (which means I’m a newbie) and was messing around with c++ tutorials and finished almost all of them, but this took me 3 days due to compilation times, I won’t lie, I have a piece if aluminum with a processor on it (intermediate computer) but when I try to compile a game with 2 custom classes I get over 5 minutes wasted on something that was done in 2~3 seconds in unity (sorry if mentioning another software is not allowed) so my question is, How to improve the compilation speed of projects?
I don’t think that a comparision of build times of UE4 to Unity delivers a valid result from a technological point of view, as you are comparing technologies that are entirely different under the hood. This comparision might make sense with a project management perspective, so if short build times are your first priority UE probably just is not the right technology for you because C++ (generates machine code, non-context free grammar) will (nearly) always build slower than C#/.net (generates intermediate language, context-free grammar).
However there are several articles describing how to get build times down focussing on UE4 as well as on C++ in general. So I’m not going to write another tutorial on this topic here.
In general it is a good practice to reduce your includes especially in headers. Use forward declarations instead whre appropriate. Regarding UE4 I would recommend to check wether the exclusion of your changed files from the unity build is working as intended and if only the required files are rebuild after you did some changes (touching a header will cause all files including it to rebuild).
Hope this servers as a good starting point for your further investigations.
Change lightning from lit to unlit and try to open less windows this might work