How can I speed up development in C++?

Doing a fair amount of C++ is very tedious. I’m also working on a plug in which makes matters worse (the in-editor compile button doesn’t work on plug-ins). I have to quit the editor, then recompile in VS, then run the editor, then load the level I’m looking at, then re-run the app. Every time. I’m on an i7 4870, ddr4 16mb ram, sata3 ssd drive. Compiling and linking is slow even if I make minor changes (one character change: 2m:42s), launching the editor is slow (1m:34s), launching the level I’m looking at is slow (1m:30s), then running the app is slow as well (1m:25s from hitting the ‘Play’ button until I’m playing). Iteration time: 7m:11s which is too tedious for me.

Are there good techniques people use to speed up the process when using C++?

I have no idea why everything is taking you so long, my system is not dissimilar but everything is much faster.

But you can improve the flow… Leave the editor open, switch to VS, recompile and let it do a hot reload. As long as you aren’t making changes to constructors there is no need to restart the editor.

You can also set the level you are working on to open automatically on editor launch. Edit…Project Settings…Maps & Modes… Editor Startup Map.

Hope that helps.

Pagan

As I mentioned in OP, the Compile option does not work if you’re working on a plug-in. Switching to VS and trying to recompile does not help, because VS is running the editor. It would ask, “Are you sure you want to quit debugging?”. At which point it would quit me out of the Unreal Editor and we’re back where we started.

Hot loading is a god send :slight_smile:

It usually takes a million years for the first compile but compiles after are typically only a few seconds (just counted 11 seconds) and then hot loads.
My computer isn’t that great, it’s about 6 years old.

Might be minor, but some points to check:

  • Have you upgraded VS to Update 4? It included significant performance gains for large projects.

  • Adding the following lines to “YourGame.Build.cs” (you can just add it directly above the “PublicDependencyModules…” lines) has helped a lot in my experience:

    MinFilesUsingPrecompiledHeaderOverride = 1;
    bFasterWithoutUnity = true;

What ended up speeding things the most was deleting the visual studio .sdf file. Minor compile changes went from 2m:30s to 0m:42s.

Another way to recompile and reload your module or plugin is to go to Window->Developer->Modules, find your plugin or module in the list, and use one of the action buttons; unload, reload, or recompile. That way you don’t have to wait on visual studio for compiling and don’t need an extra step to get it refreshed in the editor.

When I’m writing plugin/module code I still make my code changes in visual studio but I use the recompile button on the modules window to compile and load the changes.