How to eliminate Resharper 5.1 and 5.1.1 performance issues?

Ever since upgrading to Resharper 5.0, the performance of Visual Studio 2010 has basically been non-usable for myself and my team.  I own a copy, but my team members just evaluated it.  It starts out working fine, but then after  ~60 minutes of normal use without memory usage skyrocketing (devenv.exe going from 250M on startup to over 800MB when it finally becomes non-responsive).

Per other threads, we've tried upgrading to v5.1 and I just tried v5.1.1.  v5.1 seemed a little better, but v5.1.1 was not (it actually seemed worse).  However, if we use VS2010 without Resharper enabled, there's no problem.  I tried to capture a couple minutes of activity using dotTrace, but once we started profiling devenv.exe basically became entirely unresponsive (CPU went from 3-4% to almost 100%).  I uploaded the file to your ftp server - snapshot-jal.zip

FYI - here are the steps I can follow to quickly cause Resharper to kill VS2010:
1)  Open medium-sized ASP.NET MVC solution (~25 projects, 500,000 lines of code, .NET 4.0)
2)  Pull a tab to a second screen
3)  F5 to debug the app
4)  Edit an aspx page while the app is running
5)  Reload the page that was just edited

This is the fastest way to hit the 800MB point where VS2010 crashes.  However, even if I never debug an app and never use multi-monitors, the same thing happens, but takes a little longer (2-4 hours before a restart is needed).  Without Resharper, VS2010 runs fine ... one of our developers uninstalled it after his eval and hasn't shut down VS2010 in over a month (vs. twice daily VS2010 restarts with Resharper).

Is there anything we can do?  We'd love to use Resharper for our entire team, but at the moment it's just not working.

EDIT:

I also uploaded a dotTrace file while I performed the exact same actions without Resharper running (snapshot-jal-no-resharper.zip).  With Resharper, it took 2 minutes, without, 15 seconds.  Also, with Resharper, dotTrace took over 20 minutes to load up VS2010, without Resharper active dotTrace took 2 minutes to load Resharper.  I realize that for the test much of the time was due to the profiling overhead (all I did was move a tab and replace a "." with another "." to activate intellisense), but the relative difference matches our perceived experience as well.  Any help would be greatly appreciated, we REALLY want to be able to use this product.

10 comments
Comment actions Permalink

Hello Josh,

Could you please describe your hardware configuration in detail? Does it
help if you turn off code analysis (under ReSharper | Options | Code Inspection
| Settings)? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Ever since upgrading to Resharper 5.0, the performance of Visual
Studio 2010 has basically been non-usable for myself and my team.  I
own a copy, but my team members just evaluated it.  It starts out
working fine, but then after  ~60 minutes of normal use without memory
usage skyrocketing (devenv.exe going from 250M on startup to over
800MB when it finally becomes non-responsive).

Per other threads, we've tried upgrading to v5.1 and I just tried
v5.1.1.  v5.1 seemed a little better, but v5.1.1 was not (it actually
seemed worse).  However, if we use VS2010 without Resharper enabled,
there's no problem.  I tried to capture a couple minutes of activity
using dotTrace, but once we started profiling devenv.exe basically
became entirely unresponsive (CPU went from 3-4% to almost 100%).  I
uploaded the file to your ftp server - snapshot-jal.zip

FYI - here are the steps I can follow to quickly cause Resharper to
kill VS2010:
1)  Open medium-sized ASP.NET MVC solution (~25 projects, 500,000
lines of code, .NET 4.0)
2)  Pull a tab to a second screen
3)  F5 to debug the app
4)  Edit an aspx page while the app is running
5)  Reload the page that was just edited
This is the fastest way to hit the 800MB point where VS2010 crashes.
However, even if I never debug an app and never use multi-monitors,
the same thing happens, but takes a little longer (2-4 hours before a
restart is needed).  Without Resharper, VS2010 runs fine ... one of
our developers uninstalled it after his eval and hasn't shut down
VS2010 in over a month (vs. twice daily VS2010 restarts with
Resharper).

Is there anything we can do?  We'd love to use Resharper for our
entire team, but at the moment it's just not working.

Thanks,

---
Original message URL:
http://devnet.jetbrains.net/message/5272794#5272794



0
Comment actions Permalink

Hardware config = 2.5GHz Core Duo (dual core) processor, 4GB RAM, Vista Ultimate 64.  Even when devenv.exe hits 800MB of memory, the memory usage is at ~80% and the hard-drive does not seem to be swapping.

For the 30 minute test I performed, disabling Code Inspection definitely makes things better, and memory does not creep up as fast, but there are still lags that increase over time.  Are you suggesting we disable code analysis (which is one of the big reasons we like Resharper over competing products), or are you just trying to find the source of the problem?

Thanks


marcus23 wrote:

Hello Josh,

Could you please describe your hardware configuration in detail? Does it
help if you turn off code analysis (under ReSharper | Options | Code Inspection
| Settings)? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

I've noticed similar occurences, not quite as frequent as the OP on this thread though. As I can routinely run 2-3 visual studios all with R# 5.1.1 running with solution analysis going. My machine is somewhat of a power house though in terms of a workstation, 2.53ghz dual core xeon with 6gb of ram, 256mb graphics card Win7 enterprise x64.

Memory usage doesn't seem to be the real issue, there seems to be more of a factor with CPU thrashing where VS will sky rocket on CPU usage and stay frozen at either 50% or 100% CPU utilization so clearly taking over 1 core or sometimes both cores of my processor. This seems to occur mostly when memory usage exceeds 600-800mb as the OP posted. If any of my VS instances reach 1GB of ram usage is usually a catstrophic point where it becomes completely unusable then requiring a VS restart.

0
Comment actions Permalink

Have you been able to find a way around this?  It's the exact same thing I see (Resharper hogging either 50% or 100% of CPU, depending on whether 1 core or 2 cores are being used), although I rarely have more than one copy of Resharper open at a time.  As you have found, this happens far more frequently once memory usage starts going up ... for the first 10-15 minutes of heavy use though, Resharper is very fast.

0
Comment actions Permalink

Were you able to find out anything from the performance snapshots I uploaded?  

0
Comment actions Permalink

This doesn't impact me that often because I work with Mercurial DVCS where I routinely switch branches that I'm working on. Since VS has a heart attack if you attempt to switch branches with a project open I routinely unload my project or close VS itself when I switch branches. This seems to counter the issue mostly for me.

This does seem to be related to solution size however. I never have issues when I'm working on my solutions that are small with 5-10 projects and seems to solely happen to my primary solution of 40 projects.

0
Comment actions Permalink

Hello Josh,

I'm afraid I don't see anything suspicious in the snapshot you've uploaded:
ReSharper takes only 5% of the overall execution time. What kind of activities
did you perform while taking this snapshot? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Were you able to find out anything from the performance snapshots I
uploaded?

---
Original message URL:
http://devnet.jetbrains.net/message/5273117#5273117



0
Comment actions Permalink

As I stated in my original message:  all I did was move a tab and replace a "." with another "." to activate intellisense.  However, it was almost impossible to even do this with dotTrace running.  It took over 2 minutes to perform those 2 simple actions ... with Resharper disabled it took 15 seconds (so the problem was not entirely dotTrace).  It was literally impossible to type more than a couple characters with both dotTrace and Resharper running.  I tried doing a simple Refactor...Rename, and the entire system hung for almost 20 minutes.  

0
Comment actions Permalink

Hello Josh,

Could you please monitor the number of GCs in Gen 0,1 and 2 at the moment
when Visual Studio with ReSharper consume 100% CPU using Control Panel |
Administrative Tools | Performance Monitor? Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

As I stated in my original message:  +all I did was move a tab and
replace a "." with another "." to activate intellisense+.  However, it
was almost impossible to even do this with dotTrace running.  It took
over 2 minutes to perform those 2 simple actions ... with Resharper
disabled it took 15 seconds (so the problem was not entirely
dotTrace).  It was literally impossible to type more than a couple
characters with both dotTrace and Resharper running.  I tried doing a
simple Refactor...Rename, and the entire system hung for almost 20
minutes.

---
Original message URL:
http://devnet.jetbrains.net/message/5273301#5273301



0
Comment actions Permalink

I've been monitoring this for the past couple days ... here's what I've seen:

  • If I'm using a non-web solution, there are few spikes in GCs
  • Opening up an aspx page causes Gen 0 GCs to go from ~1 per second to ~25 per second.  With Resharper disabled, this spike does not occur
  • Making changes that impact aspx/ascx pages (we're using ASP.NET MVC with strongly typed view models) seem to cause memory to go up and not be released
  • Performance problems seem to start after editing aspx pages


As a test, I created a copy of our web solution (the one with most of the trouble) but removed the web project.  While memory usage consistently crept up, and performance degraded a bit, it was still usable throughout my 5 or 6 hour test.

I hope this helps to diagnose the issue.

0

Please sign in to leave a comment.