UE5 C++ Compile Time is Substantially Longer

Compile Score is a pretty good one, and shows the hierarchy of includes building up to a single file too. Take this example (posted by somebody else after I complained about this elsewhere recently)

At the risk of hijacking this thread to just have a good old moan, I just find myself becoming increasingly frustrated with how a lot of engine stuff remains incomplete or in an untidy state for long periods of time, sometimes permanently. It feels like it’s becoming increasingly common, and UE5 would have been the perfect time to do a general clean up.

The issue compounds over time because Epic are very excited to push all these new feature plugins before they are really production ready, then release them out of “experimental” still full of TODO comments, and it’s too late to clean them up because they’ll break everybodies projects. EnhancedInput, CommonUI, GameFeatures, even Gameplay Abilities is guilty of this. I mean just look at this CommonUI header, which is a pretty typical example:

I only wanted to use the Enum - but now that header is dragging in Streaming Types, Slate Types, Data Tables, Platform Data etc.

It’s a loosing battle trying to keep your project compile times low because all of this is done at the engine level, and it’s particularly a problem for reflected types where forward declaration is not always possible due to UHT requirements etc. Before you know it, your project has to adopt the same patterns.

Apologies, I’m just ranting now - but there is in general, enormous scope for compile time reduction in UE if Epic are prepared to invest some real energy into it. Any large codebase is going to have these problems of course, but we’re long overdue a good hardening pass.

3 Likes