This is the final post in a five-part series covering performance improvements for Visual Studio “15”.
This series covers the following topics:
- Part 1: Faster Visual Studio “15” Startup
- Part 2: Shorter Solution Load Time in VS “15”
- Part 3: Reduced out-of-memory crashes in VS “15”
- Part 4: VS “15” gets faster for C++
- Part 5: Improving overall VS “15” responsiveness
In this post we will highlight some of the improvements we’ve made in the Preview 5 release that make using Visual Studio more responsive as part of your daily use. We’ll first talk about improvements to debugging performance, Git source control, editing XAML, and finally how you can improve your typing experience by managing your extensions.
Debugging is faster and doesn’t cause delays while editing
In Visual Studio 2005 we introduced what’s known as the hosting process for WPF, Windows Forms, and Managed Console projects to make “start debugging” faster by spinning up a process in the background that can be used for the next debug session. This well-intentioned feature was causing Visual Studio to temporarily become unresponsive for seconds when pressing “stop debugging” or otherwise using Visual Studio after the debug session ended.
In Preview 5 we have turned off the hosting process and optimized “start debugging” so that it is just as fast without the hosting process, and even faster for projects that never used the hosting process such as ASP.NET, Universal Windows, and C++ projects. For example, here are some startup times we’ve measured on our test machines for our sample UWP Photo Sharing app, a C++ app that does Prime Visualization, and a simpler WPF app:
To achieve these improvements, we’ve optimized costs related to initializing the Diagnostic Tools window and IntelliTrace (which appears by default at the start of every debugging session) from the start debugging path. We changed the initialization from IntelliTrace so that it can be initialized in parallel with the rest of the debugger and application startup. Additionally we eliminated several inefficiencies with the way the IntelliTrace logger and Visual Studio processes communicate when stopping at a breakpoint.
We also eliminated several places where background threads related to the Diagnostic Tools window had to synchronously run code on the main Visual Studio UI thread. This made our ETW event collection more asynchronous so that we don’t have to wait for old ETW sessions to finish when restarting debugging.
Source code operations are faster with Git.exe
When we introduced Git support in Visual Studio we used a library called libgit2. With libgit2, we have had issues with functionality being different between libgit2 and the git.exe you use from the command prompt and that libgit2 can add 100s of megabytes of memory pressure to the main Visual Studio process.
In Preview 5, we have swapped this implementation out and are calling git.exe out of process instead, so while git is still using memory on the machine it is not adding memory pressure to the main VS process. We expect that using git.exe will also allow us to make git operations faster over time. So far we have found git clone operations to faster with large repos: cloning the Roslyn .NET Compiler repo on our machines is 30% faster: takes 4 minutes in Visual Studio ‘15’ compared with 5 minutes, 40 seconds with Visual Studio 2015. The following video shows this (for convenience the playback is at 4x speed):
In the coming release we hope to make more operations faster with this new architecture.
We have also improved a top complaint when using git: switching branches from the command line can in cause Visual Studio to reload all projects in the solution one at a time. In the file change notification dialog we’ve replaced ‘Reload All’ with ‘Reload Solution’:
This will kick off a single async solution reload which is much faster than the individual project reloads.
Improved XAML Tab switch speed
Based on data and customer feedback, we believe that 25% developers experience at least one tab switch delay > 1 sec in a day when switching between XAML tabs. On further investigation, we found that these delays were caused by running the markup compiler, and we’ve made use of the XAML language service to make this substantially faster. Here’s a video showing the improvements we’ve made:
The markup compiler is what creates the g.i.* file for each XAML file which, among other things, contains fields that represent the named elements in the XAML file that enables you to reference those named elements from code-behind. For example, given <Button x:Name=”myButton” />, the g.i.* file will contain a field named button of type Button that allows you to use “myButton” in code.
Certain user actions such as saving or switching away from an unsaved XAML file will cause Visual Studio to update the g.i.* file to ensure that IntelliSense has an up-to-date view of your named elements when you open your code-behind file. In past releases, this g.i.* update was always done by the markup compiler. In managed (C#/VB) projects the markup compiler is run on the UI thread resulting in a noticeable delay switching between tabs on complex projects.
We have fixed this issue in Preview 5 by leveraging the XAML Language Service’s knowledge of the XAML file to determine the names and types of the fields to populate IntelliSense, and then update the g.i.* file using Roslyn on a background thread. This is substantially faster than running the markup compiler because the language service has already done all the parsing and type metadata loading that causes the compiler to be slow. If the g.i.* file does not exist (e.g. after renaming a XAML file, or after you delete your project’s obj directory), we will need to run the markup compiler to generate the g.i.* file from scratch and you may still see a delay.
Snappier XAML typing experience
The main cause of UI delays in our XAML Language Service were related to initialization, responding to metadata changes, and loading design assemblies. We have addressed all three of these delays by moving the work to a background thread.
We’ve also made the following improvements to the design of assembly metadata loading include:
- A new serialization layer for design assembly metadata that significantly reduces cross boundary calls.
- Reuse of the designer’s assembly shadow cache for WPF projects. Reuse of the shadow cache across sessions for all project types. The shadow cache used to be recreated on every metadata change.
- Design assembly metadata is now cached for the duration of the session instead of being recomputed on every metadata change.
These changes also allow XAML IntelliSense to be available before the solution is fully loaded.
Find out which extensions cause typing delays
We have received a number of reports about delays while typing. We are continuing to make bug fixes to improve these issues, but in many cases delays while typing are caused by extensions running code during key strokes. To help you determine if there are extensions impacting your typing experience, we have added reporting to Help -> Manage Visual Studio performance, and will notify you when we detect extensions slowing down typing.
Notification of extensions slowing down typing
You can see more details about extensions in Help -> Manage Visual Studio Performance
Try it out and report issues
We are continuing to work on improving the responsiveness of Visual Studio, and this post contains some examples of what we have accomplished in Preview 5. We need your help to focus our efforts on the areas that matter most to you, so please download Visual Studio ‘15’ Preview 5, and use the Report-a-Problem tool to report areas where we can make Visual Studio better for you.
![]() |
Dan Taylor, Senior Program Manager
Dan Taylor has been at Microsoft for 5 years working on performance improvements to .NET and Visual Studio, as well as profiling and diagnostic tools in Visual Studio and Azure |








I’m looking forward to seeing if these performance checks on extensions results in noticeable improvements from extension authors.
I know this isn’t the domain of the main Visual Studio team- but I wish SSMS would use the current Visual Studio shell instead of an older one and benefit from these improvements. There is no extension manager in SSMS and extensions routinely misbehave. I’d love for something to tell me what is causing the typing delays when using SSMS.
Join the conversation
I really hope they’ll move to VSCode-like Electron-based shell for SSMS. It would be so much better, especially for addins developers
Wow flashback time. Didn’t realize that anyone developed with visual studio anymore. At least not the reputable big name companies.
Go back to your little bubble.
By almost any measure it’s the best IDE available.
That’s what I like to hear, more optimizations and the long awaited offline installer.
On a separate note, are the GitHub plugin and Git for Windows now redundant in VS “15”? And will there be support for Mercurial?
Thanks.
The Git integration in VS includes the standard features that work across multiple Git hosters as well as VSTS/TFS-specific workflows. The GitHub extension then adds GitHub-specific features.
I’m not aware of any planned support for Mercurial.
Using the VS-integrated Git is still a no-no due to it’s lack of SSH-support.
The Git integration in VS “15” now supports SSH.
You got a typo there “In Visual Studio 2005 we introduced what’s known as the hosting process for WPF” – probably should be VS 2015
Hey Broken Glass,
We did actually introduce the Hosting Process in VS 2005, and it had outlived its usefulness so we are removing it to help with additional perf wins.
So for me, the change from an XAML tab often takes about 30-60 seconds and more … Usually it is quite fast in the beginning (<10 seconds I call fast!). But as time goes by, it becomes unbearably worse. I'm curious. So far this problem has cost several hours of productive work …
Hey sky,
Are you talking about your experience with VS 2015? I would urge you to try the same project with VS “15” and if you see improvements in XAML tab switch times. I would love to hear more. Feel free to reach out to me at karann at microsoft dot com.
Same here (VS2015).
Not too keen on installing a preview though. I used to be an early adopter but this has caused installation issues in the past.
Quote: “Using the VS-integrated Git is still a no-no due to it’s lack of SSH-support.”
Exactly, and I wonder since MS swapped libgit2 out to the “real deal” (or maybe not) why this issue is still prevalent. I don’t understand at all what is holding them back. It’s a joke…
The Git integration in VS “15” now supports SSH.
Is there a VS15 roadmap?
Hi guy
It would be great to know what kind of information you are looking for with a roadmap. Could you please email me – denizd at microsoft .com so we can continue the discussion.
Cheers
Deniz
Hello, I want to download offline installer or iso !
Because my computer hint “Network can not connect ” ,but my computer Network is very good ,and my computer Windows Firewall is close.
I don’t know reason,so,I want to hava iso installer.
Finally ,It’s that I want to know this visual studio 15 release When to publish?
Thanks for the question wangboshun, we will add offline install functionality in a future release of Visual Studio 15. Cheers, Deniz
Have VS “15” dropped support for website projects? A compatibility dialog is displayed when trying to load the website.
Hi Kurt, website project should be working fine. If you’re having problems you can reach me at [email protected]. I should be able to help you out.
Thanks,
Sayed Ibrahim Hashimi
YES! I love the outline/indent/branching dots thingy whatever the terminology (small things eh!)
The mouse hover over is a bit annoying though – is there a way of suppression? Could this and the Code Lens be toggled from the Text Editor toolbar?
Hello there –
We believe that we have addressed the major source of frustration with the tool tip annoyance: “too much content”, “too aggressive in showing up”. Please try this out in RC to see if you like it and let us know through Developer Community. You can disable the indent guidelines by going to Tools -> Options, and under Text Editor -> General, uncheck the “Block structure guides” checkbox for Visual Studio Preview 5, or the “Show indent guidelines” checkbox for any later releases.
For turning off Code Lens, go to Tools -> Options, and under Text Editor -> All Languages -> CodeLens, uncheck “Enable CodeLens”. There is no simple shortcut to accomplish this in the editor at this time.
Thank you for trying Visual Studio and taking the time to share your feedback. We appreciate it!!
Magic, that trick worked a treat!
(sorry, its halloween 😉
Speaking of git, is there any hope of scheduling a re-think of the source control user interface? It is one of the least-intuitive interfaces I’ve seen in decades. And that includes HP and IBM products…
They must really take a look at GitKraken
In the context of responsiveness I feel that the Output panel strongly needs a redo.
Let me drop the follwoing link to an improvement proposal on the Output panel here:
https://social.msdn.microsoft.com/Forums/en-US/1c9f71e8-b4a4-4c9a-ad0d-81e681ee02af/proposal-visual-studios-output-panel-should-provide-information-better-and-clear
Out of curiosity, Have you opened any issue for libgit2 on github regarding these performance issues?
Also were you using plain libgit2 from C/C++ or LibGit2Sharp from .NET ? (the later being a .NET wrapper not particularly designed for lightweight interop and performance)
Will I be able to update VS 15 from preview to full release with the proper license key?
“In the file change notification dialog we’ve replaced ‘Reload All’ with ‘Reload Solution’”
Finally! In VS2015 it rarely offers the separate reload solution dialog on svn update. But even then it seems to be slower than a manual Close Solution and reopen. May also be an interaction issue with Resharper though as I see its loading assemblies progress bar.