Scroll to content

Localhost slowdown: cracking poor performance in TortoiseSVN and Zend Server

Continuing from my previous post on troubleshooting SVN setup on Windows, I’ve recently encountered (and solved) quite a serious performance hit that’s been affecting my main development machine.

Since I spend a lot of time on the move, I do most of my development on my laptop, a Dell Latitude D430. It’s a fantastic little machine, but suffers from a storage bottleneck due to the PATA interface and 1.8″ disk, exacerbated by the requirements of a development environment – a web server, database server, IDE and SVN server & client place a lot of demands on the storage subsystem.

Slow performance on localhost

My development environment consists of working copies checked out from my local repository into the web root of my dev server, where I can test changes immediately. Recently I’ve noticed that performance has been particularly slow, so I set out to resolve the issue. Here’s what I discovered:

TortoiseSVN: Cache Me if You Can

TSVNCache.exe is the service responsible for maintaining the SVN status overlays on icons in Windows Explorer. By default, TortoiseSVN is set to scan all fixed disks for SVN changes, which is wasteful.

  1. Navigate to Settings > Icon Overlays and untick all entries in the Drive Types box.
  2. Add entries in the Include Paths box corresponding to where your working copies are kept – mine were at C:\htdocs and C:\Users\Chris\Documents\NetBeansProjects. Put one entry on each line, omitting the trailing slash and ending the string with an asterisk (*) to match all subfolders recursively.
  3. Apply your changes, open Task Manager and kill the TSVNCache.exe process – this process will autostart next time you perform a SVN operation, but this time will only watch the specified folders for changes, drastically reducing disk access.

Adding Antivirus to Injury

For SVN versions prior to 1.7, write operations cause the working copy to be locked, which means that a lock file has to be created in every directory, then the action is executed, after which those lockfiles are deleted. For each of these operations, the files are also scanned by the on-access scanner of the installed antivirus. This can cause many more disk operations than are strictly necessary. Excluding the paths of your working copy and subversion repository from on-access scanning will dramatically improve the speed of your dev server, especially if your working copy is located in your web root.

This entry was posted in Code and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *