Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper throws OutOfMemoryException on big solution

IDE Configuration:

Visual Studio 2008 + Resharper 4.5.1 + Agent Smith 1.1.8. There is no any sophisticated configuration for last to add-ins.

Solution description:

33 class libraries + web site with 200+ pages.

Symptoms: After an hour of work under tuned on Resharper the IDE starts to throw the OutOfMemoryExection exceptions. Normal work is impossible only reopen Visual Studio can help.

Does anybody has such problem? Is it possible to configure Resharper to consume less memory? What Resharper feature does consume the most memory?

like image 271
klashar Avatar asked Dec 10 '22 19:12

klashar


1 Answers

Welcome to the World of ReSharper. This lesson is called, "You get what you pay for".

Various features of ReSharper do require knowledge of your entire solution. This information takes memory. The solution-wide analysis may be the most memory-intensive, but even changing the signature of a public method requires knowing all the code that calls that method.

One thing you can do sometimes is to use smaller, "sub-solutions". If you are refactoring your DAL layer for instance, you only need the DAL and any unit test projects. What I sometimes do is to select the solution in Solution Explorer and use File->Save Solution As to save it with a different name in the same folder. I then remove projects until I'm left with those I want. Do not save the projects you're removing (save them before you start). When you've got the set you want, just do a Save All.

If it becomes too much of an annoyance, you can also get ReSharper to display the memory usage in the status bar. That feature has been available for a long time.

like image 89
John Saunders Avatar answered Jan 10 '23 01:01

John Saunders