Our Blogs
English
Español
Skip Navigation Links
News
Our Team
Mentoring
Developer Cave
Go to home page
Go Search

 
Other Blogs
There are no items in this list.

Our Blogs > English > Developer Cave
Performance & optimization tips for Visual Studio 2008
There's no development tool which cannot be optimized in performance. VS 2008 is not an exception, and the same is valid for the kind of applications you can build with it. Since we all have to make demos in our presentations, its interesting to review some of the most relevant performance & optimization tips, from both points of view: the tool itself, and the applications you can build with it. Besides, in order to let you dig into further research for each topic, I'll give some recommendations in the way of links to articles for different optimization and performance scenarios, or -otherwise- this could become a whole book, and not a "Developer Cave" article.
 
Under the point of view of VS 2008, I've seen several interesting tips:
 
About conditions of your hard-drives: Scott Guthrie suggests some interesting ones at: "Tip/Trick: Hard Drive Speed and Visual Studio Performance" and the Chief of Development at Ms-Redmond, Soma Somasegar, also suggests the following:
 

·      Rebuilding a Visual Basic project and running a background compiler is 3x faster and uses 3x less memory.  More about this topic here.

·      Scrolling large C# files in the Editor is 100% faster, while typing in new text is 50% faster

·      The response time of IntelliSense with large types in C# is up to 10 times faster

·      Incremental build time runs up to 90% faster on C++/CLI project solutions. More about this topic here.

·      Office Word and Excel files are processed 20x faster on the server

·       TFS Version Control command processing was re-written to support unlimited sized operations on key commands without being memory bound on the server. In our measurements, key Commands also run 10% - 60% faster, with the larger improvements associated with bigger projects.  More about the work to improve TFS scalability here and here.

 

Also, there are performance improvements that exploit multi-core hardware. For example,multi-threaded support to MSBuild. In addition, using the /MP switch, you can significantly improve C++ projects' build time – they claim improvements of up to 30% when building the C++ Frontend compiler on dual-core hardware-. Other significant performance improvements were also made in the .NET Framework 3.5 runtime to streamline the CLR thread pool to help multithreaded applications of all kinds. These architectural changes, when combined with socket API changes, improve asynchronous socket I/O throughput up to 70% when a 2nd processor core is available, for example.The full scope of this work is discussed in more detail here
 
On the other side, i.e, the application optimization side,
there numerous references of interest, depending of the kind of application to build. The very best I've seen on this topic is a page at dotnetslackers.com entitled "Performance". It's full of links (including some of the above), on many different optimization tips & techniques. 
 
Hope this helps.
 
Marino Posadas
Solid Quality Mentors' Development Division
(Spain & Portugal)
January 2008
Debugging the .Net Framework code with your own

In October 2007, Scott Guthrie announced the future possibility to debug Microsoft internal .Net Framework code from Visual Studio 2008.

This option is available now, following these steps.

Note: I am not a Genius; I am just explaining what they told me J

The first step is to install the Hot Fix to have this option available

Then, open Visual Studio and go to Tools – Options; and change the configuration like this image

Then go to the Symbols options and add the following symbol location: http://referencesource.microsoft.com/symbols

Add a local cache directory

Ensure you have disable the Search the above location only when symbols are loaded manually (this is a tip I added J )

In addition, enable the load symbols…. (Notice this take some time the first time).

When you click Ok, John Security will give you a dialog gift (and that is always welcome!)

Then you are ready to debug!

As an example, this routine loads subfolders in a tree view when a node (which point to a drive) is expanded

We just need to add a breakpoint

Start the execution, and when we hit the breakpoint, click in the Step Into button

Then we will be at the .Net Framework code

(You can be sure about that because

  1. Usually I try to not write c# code
  2. The comments are in English and usually I comment in Spanish except when I write code to publish here J)

A final tip:

Once you have debugged at least one time, uncheck the reference to http://referencesource.microsoft.com/symbols

This will make Visual Studio work faster … but remember to re load them from time to time (just in case someone change somethingJ!).

Automating databinding in WPF

One of the things that i wish MS had done was to put a good automated way to setup data binding in VS 2008 for WPF. But, alas they did not.

So, it took me about 4 hours to do it!

http://blogs.solidq.com/EN/DevCave/Files/ObjectToolAddInVS2008.zip

Play around with the toolbar icons in the tool starting with the 1st one on the left.

Also, there are tons of other features in this tool. Not all of them are fleshed out yet as its a work in progress.

Ken Spencer (ken@solidq.com)

 ‭(Hidden)‬ Admin Links