Sometimes, Visual Studio with ReSharper can eat up more RAM than it should. This situation can be caused by several things, and here are some troubleshooting steps to determine the cause of it.
- Visual Studio configuration. Sometimes, memory issues can be caused by other extensions, which are installed in Visual Studio with ReSharper. It is a nice idea to temporary turn off or uninstall all other plugins/extensions, reload VS with ReSharper only and check memory usage after that.
- ReSharper configuration.
- Memory-heavy options. Several ReSharper features are known to use more memory when enabled. The most common feature is Solution Wide Analysis, which can use several hundred megabytes of RAM, especially on a big-sized solutions.
Try to turn off Solution Wide Analysis (SWA) in "ReSharper | Options | Code Inspection | Settings", 'Analyze errors in whole solution' checkbox.
- Monitoring Visual Studio Managed Memory. To enable this, please turn on the 'Show managed memory usage in status bar' checkbox located in "ReSharper | Options | Environment | General" dialog. This will indicate amount of managed memory used by VS.
Please note, that you need to have the VS Status Bar visible to see the indication ("Tools | Options | Environment | General | Show status bar" checkbox).
- Manual Garbage Collection. Sometimes, CLR is not able to collect garbage automatically, and you can force a manual garbage collection. To do that, enable the 'Show managed memory usage in status bar' checkbox and described above and either double click on it, or right click and select the corresponding action.
- Verifying that the issues are caused by ReSharper. To do that, simply suspend ReSharper as described here and check if memory issues are still present.
- Perform a Memory Profiling. If none of the above helps, it is necessary to profile Visual Studio (with ReSharper enabled) process for memory usage. To do that, follow the instructions described here. After that, please create an issue in our YouTrack and let us know a short description of the memory consumption problems you're experiencing, and specify the name of your snapshot.