(enlarge)
Visual Studio 2008 is a huge resource consumer. It takes a long time to load, then a long time to open your solution, and longer still to run and debug it. I have been using it for more than a year now, after retiring VS 2005. I have VS 2008 set on a high-performance Vista Business laptop with 2GB of memory.
While working with ASP.NET on VS 2008, my colleagues and I started to notice patterns that dramatically improve performance when running or debugging a web project. They really do work, and we laugh every time at how silly they are.
Here are two interesting tips that we encountered:
1 – The Magical VS 2008/ASP.NET Mouse Moving
When debugging a running ASP.NET application, it sometimes takes a long time to step from one line of code to the next. I usually run out of patience and snap my fingers to hurry Visual Studio along, but obviously that doesn’t work. I started moving the mouse left and right instead, and noticed that stepping from one line to the next took no time at all. I tried it again and again, and it kept working. I even asked my colleagues to try it and it worked for them too. So now, when I debug, I press F10 with one hand and move the mouse left and right with the other.
Trick: While debugging ASP.NET with VS 2008, moving the mouse continuously will make debugging faster.
2 – The Miraculous VS 2008/ASP.NET Taskbar Click
When hitting F5 or clicking “Run” to run and debug an ASP.NET Website or Web Application, the project used to compile and then sometimes take more than a minute to load the browser, while I sat patiently waiting.
My colleague, who happens to have similar laptop specs, was less patient; she used to click randomly on the screen while waiting for the browser to launch. Suddenly she clicked the taskbar and the browser launched at once. Was it a coincidence? She tried it again and again, and it worked. Then I tried it and it worked for me too, even when I waited a while before clicking.
Trick: Clicking on the taskbar after the project completes compilation and is preparing to launch the browser in debug mode will reduce the browser’s launch time.
Do you think Microsoft knows about this? Is there a logical explanation? No, but it works, so enjoy it while you can. If it works for you, please leave a comment and let me know. And if you happen to know similar tricks, send them my way.