How to improve Windows performance for the development environments

Friday, January 4th, 2008 | Articles, How To, Lifehacks

Today I’ve finally got rid of one problem that made me to restore development environment from the ghost image multiple times over the last two years. Windows shell context menus, file opening and copying (by Ctrl+C) were horribly slow (we are talking about 10+ seconds here). 

The root of the performance drop-down was simple - I often launch programs and tools directly from the network shares. And some of these automatically create file associations/context handlers in the Windows registry. These could be executed for the specific file type, or for every single file being viewed/opened. That slows the system a little bit and places a hidden booby-trap. When the network path is gone, the OS would still try to locate the program and wait for timeout period (every single time).

It is easy to diagnose this problem:

  • Disable all your network connections - the delay should be gone
  • Firewall or network monitor would show the network activity while opening file.

Solution: open your favorite registry editing tool, search for the network references in HKEY_CLASSES_ROOT and carefully remove them. I’ve simply searched for "\\" and deleted all the network associations there. It worked instantly.

Some other common related performance problems:

  • Context menu and shell handlers generally get clogged down with slow/poorly written extensions. Solution: use ShellExView to diagnose and resolve the problem
  • TortoiseSVN shell integration might get too slow with the big solutions. Solution:  tweak exclude paths in the settings for the icon overlays.
  • Development activities (and tools like Resharper) leave a lot of cache files scattered around the drive. This slows down disk access. Solutions: 
    • Make Resharper store all the cache files in the system temporary directory
    • Use CCleaner for regular (monthly basis would do it) disk cleanups. Additionally you can configure it to clean "Temporary ASP.NET Files" for .NET 1.1 and 2.0
    • Defragment you drives regularly (monthly basis would do it)
    • Use dedicated fast RAID 0 disks to improve performance of the development environment.

Note: yes, I know that with the RAID 0 the probability of the disk failure is greater. But if you follow these common-sense requirements for the efficient development environment, then this should never be a problem:

  • Development projects should be completely under version control. It should be a matter of installing prerequisites and doing checkout in order to compile and test everything on the fresh OS.
  • Virtual partition for the fresh development environment (that includes the pre-configured OS, IDE, tools and common prerequisites) is backed up and can be restored in a couple of minutes.

PS: RAID 0 drives usually have enormous disk spaces (it gets doubled). Development projects generally use a tiny fraction of it. You can use the rest for playing with different virtual machine configurations. Making a copy of the virtual machine becomes relatively cheap operation and the actual VPCs will benefit from the faster RAID access to the hard drive.

No comments yet.

Leave a comment

RSS

Search

Archives