November 2, 2012

Visual Studio running slow? Check your Anti-virus

Filed under: Development — Tags: , , — Darrin Maidlow @ 8:00 am

TurtleFor several weeks now I’ve been suffering a slow painful agony at work,  has been unusably slow.  The editor takes forever to display WPF views and don’t even get me started on builds.  I’ve got what I would consider to be a pretty decent pooter – Alienware M17xR3 with an Intel i7-2720QM 2.2Ghz, 16GB ram with SSD drives.   The machine is still generally pretty quick.  It boots in a matter of seconds.  A quick test of the disks using shows that disks are running within the expected ranges.

Visual Studio seems to be the only thing really running slowly

I tried the usual suspects.  Disabling all plugins and addins.  is a very powerful tool – but it can also come with a cost creating all of its metadata.  It was conceivable that as our solution grew (it’s at 40+ projects) some bug may have been exposed in R#.  I  also and that were rumored to help deal with slowness.

There’s no bad ideas when you’re brainstorming

That header there was for those of you with toddlers and TV’s glued to the Disney channel.  Yes, its true… I have kids TV show songs like stuck in my head most o f the time now.  Oh the joys of being a parent =)  In all seriousness though after sitting back and thinking about the systems involved it dawned on me.  Real time anti-virus scanning.  Visual Studio is constantly writing temporary files during use.  Builds are especially disk intensive.  Builds are also usually building and copying around exes and dlls that real time anti-virus engines love to scan.  This may not be immediately apparent on smaller solutions which would explain why this seems to have been a progressing problem.  As more and more code and projects were added to the solution – Visual Studio got slower and slower.   To test this theory I just disabled and ran a build.  Hurray it was fast again!

Add some scanning exceptions

Thankfully due to our strict rules on source control all of our solutions exist within one of two folders – one for and one for .  This allowed me to create a handful of exceptions under the AVG real-time scanner settings that excluded my source control repositories.  Suddenly now my designers as well as my builds are quick once more!

Set it and forget it is great – except when you set something up years ago and forget about it when its causing you problems.  =)

About

Dad. Nerd. Ninja.
I'm a software developer. It's my passion. I work for a company named ChasmX and I specialize in helping businesses solve problems and save money using custom software. I have a significant amount of experience with AutoCAD, Mapguide, GIS, databases, spatial, n-tier architecture, nHibernate - all that kinda fun stuff.

In the handful of hours I'm not glued to my keyboard I also play a little guitar, I'm sometimes in a band call the midget militia. Married, with five dogs, and a one year old daughter. Number two is due in a matter of weeks!

Being stuck in a chair as a software developer for over a decade and a half was horrible for my physical self. In the past five years I've lost almost 100lbs and gained a whole new lease on life. I've become an avid practioner of P90X/2 and Insanity. I also do a bit of running and mountain biking. I used to be a competitive alpine ski racer as a teenager and I'm still an avid skiier.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress

Switch to our mobile site