Visual Studio with ReSharper is slow

We do our best in terms of ReSharper performance, however there are some known and unknown cases where ReSharper can slow down Visual Studio.

Below is a check list that will help you troubleshoot, work around or fix the performance issues with ReSharper.

  1. First of all, make sure that the slowdown is caused by ReSharper, as opposed to a different part of your development environment. To do that, simply suspend ReSharper as described here and check if performance issues are still present. If performance improves noticeably when ReSharper is disabled, proceed to the following steps.
  2. Make sure that ReSharper system requirements are met. Please check your environment against the current system requirements. In addition, using more RAM and a Solid State Drive (SSD) instead of HDD is known to help a lot in improving Visual Studio performance with ReSharper.
  3. Review Visual Studio and ReSharper configuration. For a long list of Visual Studio and ReSharper settings that can be modified in order to improve performance, see Speeding Up ReSharper (and Visual Studio). For a maximum impact with minimum configuration changes, try the following short list:
    • Make sure that ReSharper's Solution-Wide Analysis (SWA) is turned off ("ReSharper | Options | Code Inspection | Settings | Enable solution-wide analysis" should be off).
    • If you're using Git command line or an external Git client, or if you're using a VCS other than Git, or you're working on a solution that's not under version control, please turn off Visual Studio's Git integration ("Tools | Options | Source Control | Current source control plug-in", set to "None", then restart Visual Studio)
    • Review Visual Studio settings listed under "Configuring Visual Studio preferences" in Speeding Up ReSharper (and Visual Studio)
  4. Take a Visual Studio performance snapshot and send it to JetBrains. If completing the steps outlined above didn't help improve performance, please capture a performance snapshot with ReSharper's bundled profiler, and provide it to JetBrains. We will be able to investigate the performance issue and provide specific recommendations for you. To do this, please follow steps described in How to collect a performance snapshot.
161 comments
Comment actions Permalink

Unfortunately, I see only Vytavyh.zip, not the two other files, and there are only waits and one Visual Studio's own trace:

1.22 %   <ReadStandardStreamAsync>b__0  •  10,062 ms  •  Microsoft.VisualStudio.Web.Extensions.Common.Services.Internal.NodeTaskServerProcess+<>c__DisplayClass25_0.<ReadStandardStreamAsync>b__0
  1.22 %   ReadLine  •  10,062 ms  •  System.IO.StreamReader.ReadLine
    1.22 %   ReadBuffer  •  10,062 ms  •  System.IO.StreamReader.ReadBuffer
      1.22 %   Read  •  10,062 ms  •  System.IO.FileStream.Read(Byte[], Int32, Int32)
        1.22 %   ReadCore  •  10,062 ms  •  System.IO.FileStream.ReadCore(Byte[], Int32, Int32)
           1.22 %   ReadFileNative  •  10,062 ms  •  System.IO.FileStream.ReadFileNative(SafeFileHandle, Byte[], Int32, Int32, NativeOverlapped*, Int32&)

Sorry, seems that the upload for two other files didn't finish for some reason.

 

Could you please do the following:

1) start profiling using dotTrace,

2) take steps to reproduce the lag,

3) take snapshot and send it to us.

 

It is better to do that using dotTrace Timeline profiler, because that way we'll see what happened during particular time intervals (which is much more helpful).

Thanks in advance for your assistance!

0
Comment actions Permalink

I am having (and have had for months) the same problem. I upgraded to 2017.1 today and there is no difference.  I have a more or less aggregate root-type TypeScript class that has properties that are of their own class types.  It is a fairly large class, about 760 lines, with about 80 properties/fields and 15 import statements.  When I go to a line, say to add a property/field, I hit enter, and start typing, there is a multi-second delay per key-press and the memory usage in the status bar jumps up to almost 2 GB.    The problem is not as severe on smaller TypeScript classes.

I have Solution-Wide Analysis off,  I have track changes in editor in VS off, and I have tried other optimizations.  I tried adding "*.ts" to Resharper --> Options -- Code Inspections -- Settings -- Elements to skip, hoping that I could still use Resharper for C#, but not TypeScript files.  No joy.

When I go to Tools --> Options --> Resharper Ultimate and hit Suspend, the problem goes away. 

I see no choice but to suspend Resharper when I am doing TypeScript-intensive work.  I would prefer a solution that makes it work, but perhaps you need to add the capability to suspend Resharper entirely by language until you figure out what the issue is.

Edited by Bjsafdie
0
Comment actions Permalink

@Bjsafdie

Thanks a lot for your report. Could you please take a performance snapshot and send it to us?

https://resharper-support.jetbrains.com/hc/en-us/articles/207243205-How-to-collect-a-performance-snapshot-and-send-it-to-JetBrains-Team

After investigating the snapshot, we'll be able to suggest you a possible workaround, and this problem will be surely fixed for the next release. Thanks in advance!

Also please tell what kind of Visual Studio project do you use, because it should work fine for all projects except one VS project type for which our project model includes the whole node_modules folder into processing. The fix for project model for this kind of projects will be done for 2017.2.

You can skip particular files using Third-Party Code options page: https://www.jetbrains.com/help/resharper/2017.1/Reference_Options_Code_Editing_Third_Party_Code.html.

0
Comment actions Permalink
  1. When I select Resharper --> Help --> Profile Visual Studio, I get the Feedback Center, Report Problem. There is no "Get Snapshot" button as indicated.
  2. In the Feedback Center, it will not accept my Jetbrains SSO credentials.
  3. When I click "Attachment +" and try to add a Timing or Sampling Snapshot, it shows a progress bar and the message "Attaching performance profiler...", then an error pops up indicating "Failed to download or read cached package info." No additional file is attached.
  4. At the attachment location, I see the "Environment_Info..." file, but I cannot identify any other possible profiling files.
  5. I am using an ASP.NET Web Application project with .NET 4.5.2, MVC and Web API.  Visual Studio 2015 with Update 3 installed

 

Edited by Bjsafdie
0
Comment actions Permalink

Looks like something is wrong with the built-in profiling.

If you have standalone dotTrace (or any other profiler) installed, could you please take a snapshot using it, and send it to us: https://resharper-support.jetbrains.com/hc/en-us/articles/207635255-Uploading-Large-Files-for-JetBrains-Support-Team.

Thanks in advance!

0
Comment actions Permalink

I installed dotTrace.  Do I profile the Visual Studio executable? Do you have instructions for using dotTrace for Resharper diagnostics?

0
Comment actions Permalink

Yes, sure:

1) Open solution on which you have the slowdown.

2) Start dotTrace, uncheck "start immediately" checkbox (bottom-right of the screen), then attach to Visual Studio process via "Attach to Running App".

3) Start profiling using 'Start' button, reproduce the slowdown and wait for the slow activity to run for some time, then press 'Get Snapshot and Wait'.

4) When the snapshot opens, select File -> Export Snapshot, and send the resulting ".dtp" file to us.

Thank you for your help!

0
Comment actions Permalink

@Anton, I created the snapshot, but could not upload it. I copied it to my Google drive and sent you a link to the zip file via resharper-support@jetbrains.com.

 

0
Comment actions Permalink

@Bjsafdie Thanks a lot, received it, created an issue: https://youtrack.jetbrains.com/issue/RSRP-464584. You can upvote it to stay notified when it will be fixed.

Temporarily you can disable processing some files by ReSharper using "third-party code" options page.

0
Comment actions Permalink

When deleting couple of c# lines - resharper slows down visual studio - there's a lag 1-3 seconds per lines deletion. I turned off specifically all extensions, except Resharper to identify which extension causes the problem. The lag was there. After I disabled resharper - Visual Studio worked like a charm. I'm using Resharper 2017.1.2. Is there a way to turn off some option in resharper that causes that? Solution Wide analysis is turned off. I even turned off "Enable Code Analysis" and still having the problem. It's really annoying when you need to wait 1-3 seconds to just delete couple of lines of code. I have high performance PC (32GB ram, i7, SSD), all options in you're "improve performance" suggestions were checked by me. It's just lines inside a function. Solution is really tiny - one small win form.

One little addition - the slowness happens when you delete lines through Shift+Delete. If you use just delete it doesn't cause the problem.It looks like the problem is related to moving/copying to clipboard.

PS. Figured out what was the problem. It was another program, causing the issue - "Mouse without borders". If it's running behind the scene - managing clipboard with resharper slows down visual studio.

Edited by Nick
0
Comment actions Permalink

One little addition - the slowness happens when you delete lines through Shift+Delete. If you use just delete it doesn't cause the problem.

PS. Figured out what was the problem. It was another program, causing the issue - "Mouse without borders". If it's running behind the scene - managing clipboard with resharper slows down visual studio.

Edited by Nick
0
Comment actions Permalink

I do not have any performance issues with ReSharper. But I have a question regarding Solution Wide Analysis performance.

I run ReSharper on Intel i7-4790K with 4 cores. Project I'm working on contains 23000+ files which are analyzed during Solution Wide Analysis. Full analysis takes 1-2 hours to complete, which is great! Thanks for this achievement.

So my question is if I buy new Intel i9-7980XE with 18 cores - will Solution Wide Analysis be 4.5 times faster? Does it take advantage of extremely multi-core workstations?

0
Comment actions Permalink

Solution for my.

Remove Resharper by control panel(found out Resharper 2015 edition was still installed).
Remove app. data of Resharper.(Can be find them in local data folder of user)
Removed the user setting of visual studio 2017.
Restart visual studio 2017 if open.
Open project where resharper was slow.
Close visual studio 2017.

Install resharper.
Reopen project
Wait till you can modified code.
Then I installed the plugins of Resharper, One by one.

I am starting visual stduio in administrator mode every time.
Hopes this works for you.

 

Edited by MHendrick
0
Comment actions Permalink

Similar problem as reported by many above, after following ALL recommendations (solution wide analysis disabled etc.), very large solution, full UE4 source code.

- Windows 10, VS 2015, ReSharper Ultimate 2017.1.3
- "Updating source files" triggers whenever a build configuration is selected. This happens every time, even if the configuration had already being scanned. (so say Win64 -> PS4 -> Win64 triggers a FULL scan TWICE).
- During "Updating source files" in the background the IDE is awfully unresponsive, may take 3-5 seconds per keystroke.
- Constant heap usage between 1GB and 1.7GB during scanning
- Occasional crashes during scanning
- 32GB Ram, 12 core i7, 2x1TB SSD (so resources not really an issue).

I wouldn't hold my breath to get this fixed, just adding my 2c to the complaints list. And no, still no 64 bit VS on the horizon. Sigh.

1
Comment actions Permalink

@Nigu Orru. Thanks for your report. If you're using "web site" VS project type, it is an issue with our project model - "web site" is the only project type for which our project model includes the whole "node_modules" folder - this makes our JS engine to process everything in it. With other project types (for example, "web application"), there is no such problem.

Unfortunately, this issue is not easy to fix, and will be fixed even after 2017.2 release. So if switching to another project type or opening the same solution with "open folder" is possible - this is the current workaround.

But if you use another project type than "web site" and you experience those issues - please tell, then please take a performance snapshot and send it to us (ReSharper -> Help -> Profile Visual Studio). Thanks.

-1
Comment actions Permalink

Hi @Anton Lobov. No, unfortunately it's not a WebSite project so the solution is not applicable. I'll package up a report next time I experience the project's misbehaviour. I would have done it last time but VS crashed on me before I could trigger the profiling :(. Good to see that the problem is being looked into though. Thanks.

1
Comment actions Permalink

Visual Studio Professional 2017 v15.3.2 + Resharper Ultimate 2017.1.3. Typescript related operations are horrible slow. Even basic writing in .ts files causes severe lagging. Disabling JS/Typescript language support in Resharper (or uninstalling) makes the problem go away. All 4 devs in this team has the issue.

1
Comment actions Permalink

Please try ReSharper 2017.2 EAP: https://www.jetbrains.com/resharper/eap/. There were plenty of performance-related fixes, and also this version supports TypeScript 2.3/2.4, whilst 2017.1 doesn't. 

2017.2 will be released relatively soon, so your feedback whether this version fixes the performance problem is important for us. Thanks!

-1
Comment actions Permalink

@Anton Installed EAP13 and the problem persists. Typing in a .ts file causes VS window to become "not responding".  There's no problems in .js files.

1
Comment actions Permalink

@Mrotvel Could you please take a performance snapshot and send it to us? 

1. Open the problematic file.

2. ReSharper -> Help -> Profile Visual Studio.

3. Reproduce the issue.

4. "Get snapshot" and send it to us via the reporter window.

Thank you!

-1
Comment actions Permalink

"Updating source files" takes forever (approximately 10 minutes) on each solution open or reload (like cache is always cleared). Then "Save symbols" another several minutes. Solution-wide analysis is disabled. Cache is stored in the solution folder (big fast SSD). 32Gb RAM.

Working is almost impossible.

Edited by Sergei Ivanov
1
Comment actions Permalink

ReSharper is extremely slow making system unusable. If I disable it in VS2017 my project bacomes a skyrocket! I definitely can't use it!

1
Comment actions Permalink

First time using Resharper, despite it being very useful, the typing lags really is annoying. The problem is even worse when editing CSHTML files while debugging for live preview. However, now I have found out how to remove almost all typing lags. The key is just to use manual intellisense (using Ctrl+Space and its other variants), and turn off all automatic intellisense popup as this auto-intel seems to listen and run heavy process at every keystroke. So to achieve this, I adjust both VS and Resharper settings like below:

Visual Studio

Open menu "Tools > Options"

  • In "Text Editor | All Languages (or choose only specific) | General", in "Statement Completion" box, uncheck all 3 checkboxes.
  • Search for "auto format" in options, and uncheck all auto-format / auto-indent (you might not need this, but for me VS formatting always not in line with Resharper one).
  • In "Text Editor | C# (and/or F# or any other that has intellisense) | IntelliSense", uncheck "Show completion list after a character is typed"
  • In "Text Editor | C# | Advanced", uncheck "Enable full solution analysis", check "Perform editor feature analysis in external process (experimental)"

Resharper

Open menu "Resharper > Options"

  • In "Environment | Intellisense | Autopopup", uncheck "Enable Automatic Intellisense Popup"
  • In "Environment | Intellisense | Parameter Info", uncheck "Automatically show parameter info in XXX milliseconds"
  • In "Environment | Performance Guide", follow/fix everything (by choosing Fix Silently) except for what you need (e.g. for me because I use Git, I leave "Source control plugin in use" to Ignore)

My laptop specs

  • Intel Core i7 4510U
  • 16 GB DDR3 RAM
  • 750GB SSD for project files, separate 250GB SSD for Resharper solution cache
Edited by Roland Bu'ulölö
0
Comment actions Permalink

Git is huge (as far as usage) and growing.  Would it be possible to get an explanation as to why having the source control plugin set to git causes enough issues for it to be noted in these notes?

1
Comment actions Permalink

1- I have tried the suggestions to speed up ReSharper - none make any difference. 
2- If I disable R# VS starts up in under a minute with 59 projects in the solution. With R# it is 4-7 minutes.
3- Noticeable lag in the suggestions, up to 5 to 20 seconds.
4- Does not detect changes until after or during a build.
5- Has some trouble with certain nuget packages detecting method signatures.
Searching for a replacement at this point. Will keep monitoring your progress to see if you can fix it.

1
Comment actions Permalink

I'm experimenting the exact same thing as what Cewells and Larry described and will try to use built-in VS functionalities to see if I can completely remove R#. The search functionalities (CTRL+T) are replaceable from what I see. I like the code hints that R# provided though and some refactoring commands.

I tried suspending it and the difference is huge, the solution is loaded in a few seconds. With R#, I may get to a point where VS is totally freezed during the loading. If I have more than 5 class files opened, switching from one file to another is unbearable with R# after a while and I have a PC with fairly decent hardware. Not even talking about the suspected memory leaks.

I thought it was VS2017 team that did a bad job at optimization and yelled at them on social networks. In fact most of this sluggishness and terrible user experience is caused by R#.

What I would like is that R# tries its own product with a medium/big project (15 .csproj and thousands files) instead of providing us with non-working tweaks and settings. People in this thread are all experimenting the same things, tried to disable this and that and ran into the same issues. 

Edited by KD
0
Comment actions Permalink

I have not been able to use R# for some time now and formally recommended that our company not renew any developer R# licenses.

1
Comment actions Permalink

Well, let's give a try to the latest EAP version that just came out.

0
Comment actions Permalink

If I may, you might also go through the performance guide under ReSharper -> Options -> Environment.  While I did not make every change it suggested, I made most of them.  Doing that made a drastic improvement for me.  There are still some occasional hiccups, but nothing like before. 

To the folks at JetBrains, please consider adding something that looks at the checkout status of files in projects/solutions that have source control managed with git.  I do not need to be able to check in or out (I use command line and GitKraken for that), but having that status indicator is why I have not turned off the git source provider as suggested.  You might also look at making your own git GUI at some point, either integrated, separate, or both. In either case, this would give you the necessary control to provide performance improvements without removing functionality.

0

Please sign in to leave a comment.

Have more questions?

Submit a request