ReSharper has just started an Early Access Program for v2019.1 and there are plenty of great things we plan to add or improve. The ReSharper C++ team has started this year putting the pedal to the metal on performance optimizations in Unreal Engine 4 codebases. The changes include faster cold startup times, better memory utilization, and new settings to tweak ReSharper’s indexing behavior.
Faster startup times
Depending on the CPU in your workstation, you may expect cold startup to become 5.5 to 6 times faster. This is the time between opening the solution and getting access to the full functionality of ReSharper C++.
A number of things have contributed to these speedups:
- Algorithmic improvements in code indexing.
- Skipping plugins and third-party code when indexing an Unreal Engine 4 project by default.
- Faster cache serialization.
The options that affect code indexing in Unreal Engine 4 solutions are grouped under a new options page at ReSharper | Options | Code Editing | C++ | Unreal Engine.
Clear the Index third party code and Index plugins checkboxes if you want to skip source files under “Plugins” and “ThirdParty” folders from indexing, or Index Unreal Engine source files to skip the indexing of the engine code altogether.
Note that ReSharper C++ indexes engine code in the background by default. This was already implemented in 2018.3, so here’s just a friendly reminder that you can start working with your game logic code long before the engine code is fully processed. If you turn off background indexing using the Enable background indexing checkbox, this will result in a faster but more intrusive initial indexing.
Let’s make a test!
The following performance test proves the numbers we’ve mentioned above. Using Unreal Engine v4.20.3 and the “Shooter Game” project from the Epic Games Library, we measured the cold startup time for parsing game code and Unreal Engine code, respectively:
- Intel i7-8700k: ReSharper C++ cold start time
- 2018.3:
- Game code: 30 sec
- Unreal Engine code: 23 min 00 sec
- Total time: 23 min 30 sec
- 2019.1:
- Game code: 30 sec (no change)
- Unreal Engine code: 3 min 39 sec (6.3 times faster than before)
- Total time: 4 min 12 sec (5.59 times faster)
- 2018.3:
- AMD Threadripper 1950x: ReSharper C++ cold start time
- 2018.3:
- Game code: 1 min
- Unreal Engine code: 29 min 30 sec
- Total time: 30 min 30 sec
- 2019.1:
- Game code: 50 sec
(1.2 times faster than before) - Unreal Engine code: 4 min 16 sec (6.76 times faster)
- Total time: 5 min 6 sec (6.08 times faster)
- Game code: 50 sec
- 2018.3:
The numbers speak for themselves! Feel free to get the EAP build and take your own measurements on your own Unreal Engine project.
Smaller memory footprint
Besides faster initial indexing, our team has implemented many memory usage optimizations. Both the memory traffic during initial indexing and the memory footprint afterwards have been improved in order to make the IDE more responsive.
Check out the latest ReSharper C++ 2019.1 EAP build and let us know if the IDE performance has improved for you in Unreal Engine 4 projects! As always, your feedback will be greatly appreciated. And there are more goodies coming in this area, so don’t change the channel!
Join us at Game Developers Conference 2019 later in March and chat about Unreal Engine 4 support in our tools!
Cheers,
Your ReSharper C++ Team
Any plans to give this kind of customization to any large project? I currently have to disable reshape when I open some of the larger code bases I work in.
In general, we work on many performance optimizations, not only for UE4. Maybe you can contact our support to discuss the problems on your particular projects? We’ll be glad to investigate and assist.
Hello! Same question. We have a 2M LOC solution, and cold start of RS usually takes around 5 mins. What information can I provide to help you optimize the time?
In general, please check this article https://resharper-support.jetbrains.com/hc/en-us/articles/206546919-Visual-Studio-with-ReSharper-is-slow and contact our support. Quite often problems are very specific and we need some additional logs, snapshots to investigate an issue.
The performance improvements we’ve been working on are applicable to all projects. But for very large projects you can always exclude parts of the project you are not interested in from indexing on the “Third-Party Code” options page (https://www.jetbrains.com/help/resharper/Reference_Options_Code_Editing_Third_Party_Code.html).
This seems very promising, and I can’t wait to test it out. I have one question though, are there any plans to add support for Unreal Engine macros, like meta data tags ( UPROPERTY for example)
What kind of support do you expect? In 2018.3 we’ve already added some special treatment for UE4 reflection macros, so now you don’t need wait for Unreal header build tool to work with such macros in ReSharper C++, it will resolve them correctly.
What I was eluding to is pretty simple really, just having more intellisense regarding UE4 macros. For example, knowing what specifiers are available for UPROPERTY (like BlueprintReadOnly). It’s an underrated but very useful feature imo.
This is in our plans, I’ve created https://youtrack.jetbrains.com/issue/RSCPP-25636 to track this.
Will CLion benefit from these improvements?
These are two different products based on two different architectures. So CLion can’t reuse these optimizations. Also, in CLion UE4 is used with CMake project generated by Unreal Editor, which is also different from sln files you open in VS with ReSharper C++.