liamkf / Unreal_FASTBuild

Allows UnrealEngine to be built with FASTBuild for VS2015/VS2017 and Windows 10.
MIT License
180 stars 71 forks source link

Very long linking times #41

Open davkim opened 4 years ago

davkim commented 4 years ago

Hey guys,

Not sure if anyone is still following this, but after managing to hook it up with UBT, I've been carefully analyzing compile time and have noticed that I did not see any reduction in compile time by using this, even with distributed build and cache enabled. So I dug down a little deeper and the problem appears to be coming from very long linking times.

For our project, it took us about 10 minutes to build our project without fastbuild, 12 minutes with fastbuild. Of those 12 minutes with fastbuild, the linking time itself was about 8 - 9 minutes. I just get a feeling that this isn't right.

Could anyone provide any insight for this issue? That would be much appreciated!

wout276 commented 4 years ago

We discussed it in the issue #39 . The changes to the buildtool made in 4.22 force fastbuild compilation to add an extra pass or try to get dependencies from the fastbuild -report argument. Both are not as efficient as unreals version and give quite a big overhead when building smaller projects. When building the whole engine, we still get considerable time savings. When using the cache, a full rebuild of the engine is about 10 times faster for us. The best solution would be to get fastbuild to accept multiple result files from a compilation step, although this may require significant changes to fastbuild itself