I have a project with two plugins and 34 files in total. Only two classes are big enough. Code is accurate, no unnecessary includes in headers, no monolithic headers used. I have enough memory (32 GB) and enough free space on all drives.
But any recompiling takes ~23 minutes, even if I changed just one line. Generally, it stucks at “Creating library” for most of this time with not very intensive usage of CPU by Microsoft C-C++ Compiler.
I already tried to remove Intermediate folder (so as Binaries). Don’t know what else can I try. Any ideas?
No, it’s launcher version 4.24.2. But the issue persists when compiling for 4.23 as well.
More info. I have three modules in my plugin, building of .lib stucks at different module every time with CPU working at ~12% (i. e. it’s 1 logical core of 8).
As I said, i tried to remove both Binaries and Intermediate folders in the project’s and in the plugin’s folders. Also, when compiling a plugin via command line, it creates blank HostProject and builds everything from scratch.
It’s in the plugin for sure, but if I separated all plugin’s modules in defferent plugins, they would compile quickly.
Upd. Not exactly. I traced the problem to the module which includes one large class (6000 lines in cpp). Though, there are larger classes in the engine.
You have to make sure all your plugin modules have a properly configured PCH settings.
If you don’t configure PCH option in your Build.cs files each compilation could take several minutes…