after installing resharper 6 VS takes too much CPU time - visual-studio-2010

I've upgraded Resharper from 5 version to 6 version.
After that when I type something inside VS I do see "lags".
I.e. text doesn't appear immediatly after key pressed.
My CPU is pretty slow - it's Pentium U5400
However with Resharper 5 i didn't seen such lags. I was working pretty comfortable. Now I see lags. Is it because CPU is too slow or this is Resharper bug?
If Resharper 6 has new features which require CPU time while i'm typing (anything, even comments)? It lags always.
While I type comment in VS "devenv.exe" process takes 70% of CPU. I will test how Resharper 6 works on my desktop (i7-860) in a moment.
The question is why Resharper 6 takes much more CPU than Resharper 5 and what nice features I have for that?
upd on i7-860 while typing VS takes 10% of CPU what ~ 70% of U5400. So the question is elligable. why Resharper 6 takes much more CPU than Resharper 5?

Do you use ReSharper 6.1.1? If not, then you should, because it contains many performance fixes. If you use ReSharper 6.1.1 and still experience lags, try to disable other Visual Studio extensions and plugins. If there is no extensions and plugins other that ReSharper 6.1.1 and typing is still slow, then please make a performance snapshot and send it to JetBrains as described here here. Also you can try to disable ReSharper's typing assists features (go to ReSharper | Options -> Environment | Editor and disable all Auto- and Highlight options, repeat at ReSharper | Options -> Code Editing | HTML/ASP.NET/Razor | Editor).

Related

visual studio xaml editor lag

I am experiencing a huge amount of lag while using Visual Studio (2019, 2022) xaml editor. So much lag that the editor is frustratingly unusable. Visual studio itself is not slow, so none of the "improve performance" articles that I can find are relevant as general performance is good. This problem really only manifests in the xaml editor.
I believe this might be related to how the Motherboard/CPU is configured (perhaps to use energy saving features so as to consume less energy). However I have no evidence to really prove this, just a gut feel as when using the xaml editor, I hear the CPU fan spin up and I can see activity on task manager showing 6 cores in use, and clock speed increases from its base of 4Ghz to around 4.35Ghz.
I also conclude this because I only experience this problem on one machine, which is a new build with an AMD Ryzen 9 5900X 12 Core cpu. The older machine that works fine has an intel i5-6600K 4 core CPU running at 3.5Ghz. When editing on the old machine, the experience is normal and fine, but with the AMD cpu machine, the visual studio xaml editor is just unusable.
Even a simple action such as just trying to select a few lines of xaml (shift + up cursor to select a few lines), produces lag, and I can hear the fan spin faster, see the CPU speed rise, and if I keep doing it, the cursor is jumping around all over the place and I end up typing in the wrong place, etc, etc.
The new machine has a completely clean/fresh windows build with developer tools. Both bios configurations are reasonably vanilla, despite both CPUs being the unlocked versions, I don't (well not in this circumstance) use any form of overclocking. Also, Visual studio installations are pretty standard, with no customisations.
I have been through the bios (ASUS ROG STRIX B550-F motherboard) and there is nothing obvious that I can see would be causing this - all the settings are on their defaults. I also tried the xaml options within visual studio, but they made no difference and I need to use the XAML designer so disabling it is not an option.
However I assume there are either features in the bios that I could alter? Or perhaps there are other software options in visual studio that might change this behaviour?
Any thoughts or suggestions on what to look at much appreciated.

How to overcome the lagging of typing in the editor while using ReSharper?

I'm using Visual Studio 2013 with ReSharper 9 on a quite strong computer (16GB RAM, Core i7 CPU, SSD, etc.). Still I experience heavy delays and laggings during typing for example in a C# or Razor source file.
I've noticed that every time I hit a key, the processing immediately starts, and context actions, offering rename refactorings, autocompetion immediatley shows up in the editor. It would make sense to delay these stuff for example so that all of this processing would start only when I finish typing and have some amount of quite milliseconds.
I've browsed through the settings for the third time now, but could not find anything related. Is there anything like this? If yes, where? If no, what else could I do to overcome this lagging? It's really annoying and I don't quite understand it. I can't beleive that such a computer is still not enough.
Disable Bing Developer Assistant extension if you have it by going to 'Tools -> Extension And Updates'.
Disable the Microsoft Git Provider Plugin by going to 'Tools -> Source Control -> Then setting the Plug-In ComboBox to NONE.'
The above has helped me and has improved performance on my PC. Hopefully it will help you too.
You shouldn't be seeing a lag while typing. I'd suggest disabling other extensions to see if there's a clash - something that ReSharper doesn't like being installed at the same time. Alternatively (or better yet, as well) you can profile Visual Studio to see what's going wrong. Go to ReSharper → Help → Profile Visual Studio, and ReSharper will download the profiler, attach to Visual Studio and start to gather info. Once you've demonstrated the problem, click "Get snapshot", and ReSharper will save the snapshot and add it to the dialog as an attachment. You can then describe what you were doing and submit the snapshot and description to the dev team.
I'd also suggest downloading the latest build - the 9.2 EAP has just started, and contains a number of fixes that might help performance under certain circumstances.
Also, what are you typing in - what language, what size file?

Poor VS Performance - High CPU on IsAssertEtwEnabled

I'm running Visual Studio 2013 Update 4 and have been seeing high CPU usages and noticeable delay on simple UI menu navigation and basic text editing.
Using ProcessExplorer I took a screenshot which shows one thread is doing a lot of CPU in something called IsAssertEtwEnabled:
The screenshot was captured randomly scrolling up and down in the Extensions and Updates window.
Any ideas how to speed up performance?
And yes I'm running several plugins, but I'd prefer to keep them, or at least find a way to isolate which one is causing this.
And I've reviewed a similar issue (VS2013 Update 3 incredibly slow - devenv.exe!!IsAssertEtwEnabled guilty thread), but I don't have anything from DevExpress installed.
Looks like this is caused by browserLink going rogue (or it was for me anyway)
You can disable it next time the issue occurs:
For me when I disabled it I immediately got my CPU back. I personally was linking to chrome though I'm not sure it makes a difference.
I guess if you use it hopefully it will be fixed in a new version...
Try to disable extensions one by one.
I fixed the issue by clearing ReSharper cache (VS 2015 CE).
ReSharper > Options > General > Clear Caches > Restart Visual Studio
#Sergii noticed that it's possible to delete the cache data directly in file system (%localappdata%\JetBrains\Transient).

ASP.NET MVC3 Razor views - extremely slow editing in VS2010

I've got a relatively small project written in ASP.NET MVC3. After working a while, Visual Studio 2010 becomes very slow in Razor views (other file types work fine). With "slow" I mean "every keystroke takes around 1 second to register". It doesn't matter what that keystroke was - typing a single letter is as slow as pasting a screenful of markup. During this slowdown VS2010 consumes 1 CPU core to 100%. After I restart VS2010, everything goes smoothly again for a small while. This happens in any and all Razor views.
My PC isn't the best, but it should be enough: Core 2 Duo 6700, 4GB of RAM (currently only 75% filled with VS2010 being slow and all, so it's not a RAM shortage), Windows 7 x64.
The project is close to an end, and I remember that for most time there were no problems. This has started only recently, although I cannot imagine what could have caused it.
Does anyone have any ideas about what could be wrong and what could be done to fix it?
It is plugins - TFS/AnkvSVN and ReSharper have all caused problems for me.
Turn them off one by one, to discern which one (if only one) is causing you grief.
When you find the culprit, make sure you keep up on any patches with it.
In extreme cases, turn if off if you have a long development session and don't need it the whole time (SVN for instance could be turned on when you are ready to do commits and check ins, etc.)
The issue is resolved for me, by installing the Mvc Html5 Templates.
After the installation, I picked XHTML5 and then back HTML5 from the "Target schema" combo box. After that, the paste was instant!
Edit: I uninstalled "Mvc Html5 Templates" and the issue didn't reappear. Perhaps it has something to do with the "HTML 5 Intellisense"
Have you installed sp 1 it fixed some performance related issues when loading IntelliSense for markup
Run the Resource Monitor (CTRL+SHIFT+ESC, click Performance tab then Resource Monitor button at the bottom). Pay special attention to disk I/O and perhaps CPU usage.
Sort disk I/O by Total B/Sec descending. As you type, see if it can identify a process which is causing the issue. Hopefully it's a virus scanner or some other famous performance destroyer and not the Visual Studio process itself, which wouldn't be very helpful.
Have you tried opening the same project on a different machine? This will give you an idea whether issue is in the project or VS install. Quite obvious, but is there anything in the event viewer. Are you connected to a domain while this is happening?
Well, for me the problem has turned out to be anti virus - we use (or are made to suffer) Sunbelt Vipre on our workstations and as soon as I switch off active protection (so that's basically disabling AV completely) all of a sudden all the performance issues in all windows are gone.
Sorry for adding another answer, but there seem to be lots of different causes, so - lets list all possible fixes here.
I tried disabling ReSharper and other addons - did not work. What did work - is reapplying the SP1 again.
PS. Weird, I know. Don't ask, no idea... My guess is - VS was "repairing" itself silently at some point and restored some non-SP1 components.
PPS. You might also want to try disabling "Productivity Power Tools" addon. If you have ReSharper installed - almost all the PPT features are already there, in ReSharper.
PPPS. I have a blog post with several performance tips for Visual Studio & ReSharper, might come handy..
Have you tried Cleaning the solution?
In my case, high CPU usage started out of nowhere (WPF project). Restarts of Visual Studio didn't help, neither disabling/uninstalling addons. But Cleaning the solution did help!
I was experiencing a very similar issue on a large cshtml file in VS 2015 and was solved for me by turning off all of the automatic formatting options in Options > Text Editor > C# > Formatting > General:
I then use the "Control+K,D" key combination to format the page once I have finished making the necessary code changes.

Why is Visual Studio / Resharper still slow after upgrading memory?

ReSharper suggests 4 GB of memory. I just upgraded my PC from 512 MB to 4 GB of memory (I have a Dell). Is there anything I need to do in Windows after installing this memory or should it be good to go right now? I was expecting to see a big boost in Visual Studio but it still seems slow.
Check out the new Resharper 4.5 release. They've done lots to improve speed.
You can also turn of some of the Visual Studio Intellisense options so VS doesn't do the same work as R#.
To disable VS IntelliSense:
Tools | Options
Text Editor | C# | IntelliSense
Uncheck "Show completion list..."
Text Editor | C# | Formatting
Uncheck all 3 options
If you have the Solution-Wide Analysis option enabled, this may eat a lot of memory and cause performance problems. It's best to leave it off unless doing project-project refactoring or for the occasional code analysis.
It really depends on the type and most importantly the size of your project. Resharper has always been a huge performance killer when working with large web projects like ours because it seems to have trouble coping with lots of aspx and ascx files. Our solution consists of 24 subprojects and 328 aspx pages using 640 ascx controls and sometimes it takes up to 20 seconds to open an ascx in text view (let alone design view). And our machines at work are equipped with 4GB of Ram and some with 8GB.
I had several problems with resharper that eventually led me to uninstall it completely. I am happy with the performance but could have been happier with resharper.
It is not about memory. You only need a good CPU (they recommend a quad core.)
I have ReSharper 4.5 on a Core 2 Duo and 2 GB of RAM. It takes 15 to 30 seconds to start Visual Studio but after that everything is smooth.
I personally chose to uninstall R# 6.0 after giving it a try. Performance price is just too high.
My dev PC is Win7 32-bit 4GB RAM, I mostly work on an MVC3 solution with about 40 projects in it. Even with on-the-fly analysis turned off, takes several seconds to display intellisense menu, which is a big no-no to me.
Plus suspending R# (Tools, Options, Resharper, Suspend) causes intellisense to not work any more (does R# replace VS intellisense completely?).
Too many serious drawbacks to an otherwise interesting product with many pluses.
I could see all the performance related problems are because the machines have less FSB speed (RAM speed). It is similar to how fast your processor messages consumed by the other components. The FSB speed needs to be higher (e.g. 1333/1600/1833 MHz) along with higher clock CPU and SSD for better development experiences.

Resources