Increasing Visual Studio 2012 UI Responsiveness

| by Jeff Martin Follow 17 Followers on Jul 26, 2012. Estimated reading time: 1 minute |

Microsoft continues to describe the improvements it is undertaking to improve Visual Studio 2012. Larry Sullivan presented new information from Duke Kamstra and Chuck England of the Visual Studio programming team regarding the VS Toolbox and how they lessened its burden on the main UI rendering thread.

The discussion begins with a review of the performance traces the team obtains from the PerfWatson utility. It was shown that the Toolbox on large projects could block the “Visual Studio UI by 30 seconds” when a solution was closed. In addition the Toolbox's performance was also found to be impacted by designers such as the Windows Forms designer and the WPF designer.

This impact is due to how the Toolbox is rendered. The list of components displayed by the Toolbox is composed from the components considered part of the base install provided by Microsoft and (if present) 3rd party vendors. The other group of user components are those defined by the user in a given user project.

While the first group of components does not involve much change, the second group requires Visual Studio to search through the solution being loaded for all of the components that should be displayed. The performance traces indicated that the "discovery of user controls is proportionately expensive to the size and complexity of your solution."

The following operational areas are reviewed for performance improvements:

  • Loading a solution
  • Opening a designer
  • Changing the build configuration (Debug/Release)
  • Building a solution
  • Closing a solution

The first change implemented was to stop expending processor cycles updating the designer if the Toolbox window is not visible.  The second change was a shift in approach from VS2010 with respect to how VS handles toolbox changes:  whereas VS2010 would remove all display items from the Toolbox window and then reload all needed components from scratch upon each change, in VS2012 the Toolbox will only change the displayed components based on when has changed (added or removed) since the last update. 
When long running work was needed by the application it would burden the main UI thread.  The development team moved processing heavy work off of this thread improving responsiveness.
The developers conclude with claims of significant improvement, but the numbers presented unfortunately do not provide a comparison across VS2008, VS2010, and earlier builds of VS2012.  Thus while the architectural changes sound impressive, it is difficult to quantitatively measure their improvement.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Other toolbox related performance issues by Geert Depickere

I hope that MS is also looking into solving these toolbox related performance issues:

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss