Slow compile time when creating a new class

For a while I have had a huge issue which has been bugging me for a while now. I have looked everywhere for any solutions but I haven’t found any. So basically whenever I create a C++ new class, for whatever reason my build times go up ridiculously. So normally when I change a variable name on a script it will only take like 1 to 5 seconds to build, however when I create a new C++ class ,it takes all of the sudden like 50-100 seconds. Its only after that build the build times go back to normal (but only for that script). If I make another slight change to another script, the process will just repeat for that script. This result in this is me having to rebuild the solution in order to get normal build times back (and this process can take a while). I don’t know what is causing this issue. From what it seems, when I create a new class all the build data is getting removed. It makes sense because it is only after I do a rebuild all the scripts’ build times are back to normal. The code editor I am using is Rider, but this issue applies the same for Visual Studio. Does anyone have an idea on what is causing this? Is there a setting I must of accidentally changed that is causing this? Let me know if you have any idea on what is causing this. Thanks

I don’t know much about how to speed it up, but maybe this will help.
You could cancel rebuilding in the process because first, it adds .cpp and .h files and then starts to rebuild. You could disable compiling when adding a new C++ class by going Edit → Editor preferences → Miscellaneous → Hot reload → Automatically compile newly added C++ classes.
Upgrading hardware will improve or you could try out Incredibuild. It accelerates compilation time in Unreal Engine and it doesn’t require any setup, just install it on your machine and Unreal Engine will use it automatically. Hope it helps :slight_smile: