Visual studio speed tip: Taking out the trash

Since a couple of weeks I have been having quite a delay when deleting files in visual studio. First I thought it was my Visual Studio installation, but I had the same weird delays on my machine at home. After frustrating myself once at home by reinstalling visual studio without getting any results I grabbed google and tried finding a solution for my problem on the internet.

It turned out that Matt Hinze and others had the same problem in the past. His solution was to empty the Windows recycle bin. Yes I can see you thinking there, what does the recycle bin have to do with deleting files in visual studio. Well, the files you delete in visual studio aren't deleted from disk, instead they are moved to the recycle bin. This is handy, but I don't understand why it has to run through my recycle bin before deleting the file. Just moving the file without doing an additional scan is so much faster!

So I took out the virtual trash and my problem was solved. Conclusion: Don't keep 2 GB of old files in your trashcan, it will make visual studio do funny things.

Original article can be found here: http://mhinze.com/slow-file-delete-visual-studio/