While tracking down an issue the other day, I stumbled across 25,000+ empty subdirectories inside a single folder: Documents and Settings\<username>\Local Settings\Application Data\Microsoft\WebsiteCache (or on Vista, Users\<username>\AppData\Local\Microsoft\WebsiteCache).  NTFS can technically handle this, but file system performance can slow down for a directory containing such a large number of subdirectories.

How did this happen?  I’ve been using the same XP workstation for BizTalk and some .NET development for one year, using Visual Studio 2005 SP1, BizTalk Server 2006 R2 and the Visual SourceSafe 2005 provider.  My BizTalk solutions include a C# web application project alongside numerous BizTalk projects.  After deleting everything in the WebsiteCache folder, I discovered that my BizTalk solutions opened noticeably faster.  Upon opening and closing the solution a few times, it turns out that Visual Studio was creating one empty subdirectory in WebsiteCache for most or all of my project files and items in Solution Items.  Each time I opened a solution around 15 new subdirectories were created, but never deleted.  Over the course of a year, I accumulated 25,000+.  Another developer found 33,000+ subdirectories in his WebsiteCache folder!

Opening the solutions was taking longer and longer as time went on.  By clearing out the WebsiteCache folder, the solutions (with VSS integration, and which contain around 12-15 projects) now open 10-15 seconds faster.

Other people have reported this issue to Microsoft Connect, but the issue was closed as “not reproducible.”

%d bloggers like this: