Working with Visual Studio 2015, you must have experienced the slowness and the overall sluggish performance of the IDE, especially when you are working with large solutions. There are instances when Visual Studio consumes high memory and eventually the IDE crashes. Determining the actual root cause of this slow behavior is a challenging task. In this article, you will understand how Visual Studio 2017 will overcome few of these biggest pain points of Visual Studio 2015 like frequent IDE crashes, high memory consumption, slow solution load time and make the IDE much faster for day to day development work.
Deep dive into the problem statement –
As developers, we tend to add in so many extensions these days to boost productivity – ReSharper, NCrunch, OzCode, Productivity Power Tools, Web Essentials, SonarLint , Code Cracker and the list goes on. There is every chance that one of these added extensions is causing an overall slowness and making Visual Studio IDE unstable.
Currently there is no way to identify which extension might be creating a performance bottleneck. The Windows Task Manager shows the Process name and the memory consumed but there is no way to figure out how much memory the different components of Visual Studio consume. When the memory consumed by Visual Studio goes high and the system behaves slow – we tend to kill the process and restart Visual Studio, and in most scenarios Visual Studio crashes! This is a big time killer and gets irritating at times.
Visual Studio 2017 now automatically identifies tools/extensions that slows the startup and solution load time . It pops up a notification in the IDE to the user identifying the problematic extension name.
There is a new window called ‘Manage Visual Studio Performance‘ which lists the extensions and tools that negatively impact the startup performance. Now the user is in control of how he/she wants to handle the identified performance bottlenecks. This feature allows the user to take an informed decision to either report the issue to the extension owner or have it disabled until the performance issue gets fixed.
Once your Visual Studio IDE loads up, it determines whether there are any extensions that are slowing down the solution load time. I opened my solution in VS 2017 RC and immediately got notification in the IDE stating the fact that ReSharper and NCrunch are slowing down Visual Studio.
When I opened the ‘Manage Visual Studio Performance’ window, it provided me with the details of the extensions that were slowing the IDE and by how much time.
I was a bit surprised to see NCrunch to be the biggest offender. But I guess I understand that now, since NCrunch is an automatic concurrent testing tool and runs the test suite, when any code changes are detected.
However I took a decision to disable NCrunch during the IDE startup, and enable it when I am doing development work.
Once I disabled NCrunch, and restarted my Visual Studio, it came back up much faster. I do not recommend you to do the same, but I appreciate the fact that I was able to identify the slow performing extension and take the apt action from my end. It might be all together a different extension for you, but at least you can identify them now.
Thanks Visual Studio 2017!
Along with Lightweight Solution Load feature, this is one of my favorite features in Visual Studio 2017 and am sure will receive lot of love from the developer community as well. To recap, 3 reasons why I love this feature are —
I need not depend upon any 3rd party tool to troubleshoot the problematic extensions. Using this feature I can self-diagnose the problem and take appropriate action.
Ideally Extensions should not be degrading the overall IDE Performance, and if they are consuming more memory or causing Visual Studio to crash – then at least now I am being alerted about it.
I can see the performance of extensions on my system at any time by selecting the ‘Help -> Manage Visual Studio Performance’ menu item. I can determine when I need the problematic extensions to start or load it asynchronously when it is needed.
Related Posts on Visual Studio 2017 –