BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Increasing Visual Studio 2012 UI Responsiveness

Increasing Visual Studio 2012 UI Responsiveness

This item in japanese

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
Style

BT