Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anyone Experiencing Slow Builds With VS2010?

We've recently upgraded to the final release of VS2010 and are experiencing very slow build times compared to the same code under 2008. I was wondering if anyone else is experiencing the same so I can work out whether it's just our environment or not? A few details:

  • Using VS2010 Ultimate on Windows 7 with fairly beefy machines, talking to TFS 2010.
  • The solution has been upgraded from VS2008 but still builds against .NET 3.5 and ASP.NET MVC 1.0.
  • It doesn't seem to be the compilation itself taking long but something else in the build process. This is because even projects that are up to date and don't need compiling are taking a few seconds or so to process.
  • It's not due to an Visual Studio addin because a couple guys in the team haven't installed any.
  • The first build after loading VS2010 is pretty quick, then they seem to slow down over time. For example on of the projects in my solution just took 00:00:00.08 to process after a restart. (The project was up to date and didn't need compiling) I then immediately hit rebuild and it jumps to 00:00:01.33.
  • We're also experiencing the problem with another solution that uses .NET 4.0 that was building perfectly fine under VS2010 RC.
  • There are no build events or anything like that I can blame, just straightforward assembly builds.
  • The IDE is not very responsive during the slow builds.

Anyone else has similar problems?

Update: It looks like the resolving assembly references is taking a long time. Looking at the MSBuild diagnostic output or the example above the first build has 30ms for ResolveAssemblyReferences, the second build has 800ms. Subsequent builds seem to be taking longer copying stuff around, e.g. CopyFilesToOutputDirectory jumps from 1ms to 27ms.

like image 950
MrKWatkins Avatar asked Apr 19 '10 15:04

MrKWatkins


Video Answer


2 Answers

Found the problem; turns out it was a rogue build task causing the problem. In my MVC website project I was using the YUI Compressor task from http://yuicompressor.codeplex.com/ to compress my script files and copy them over to my JavaScript unit test project. Everything was fine until this ran, but as soon as it ran it slowed down builds of all other projects! Even rebuilding single projects in the solution and going nowhere near the MVC website were slow. Must be a leak in the task or something like that...

like image 176
MrKWatkins Avatar answered Sep 21 '22 16:09

MrKWatkins


I'm also experiencing extremely slow responses generally from VS2010. I can type in a phrase, sit back and watch it typed out onto the screen a couple of seconds later. Using it's internal web server is extremely slow even when not debugging. It's unusable.

Running it on Win7 Professional x32, with a web project built on .NET 4.0, converted from .NET 3.5 on VS2008 which ran fine but was when I was using W2k3 as my development machine to keep the speed up.

All these are run as virtual machines using the latest version of VirtualBox (currently V3.2.8 r64453) on Linux Ubuntu 10.4 x64 on a massive machine. 2 x Intel i7 2.8GHz (8 virtual cores), 12GB RAM, NVidia 9600 GPU with 512MB RAM.

VM is set up to give 2 cores to Win7 and 4GB RAM and 96MB Video RAM. VT-x, 2D & 3D Acceleration and Nested Pages are enabled.

VS2010 has been tried with and without Hardware Acceleration (as it uses WPF to display it's text editor! [why???]). With, you lose the text editor and menu bars; without, you get a barely usable system. I also have Reflection and Visual SVN installed. The machine is used for nothing else. Anti-Virus is run manually to keep the load down!

[Rant Warning:] VS2010 runs like a dog and if it wasn't for the fact I've spent 11 months on this project for a client I've been working for for 7 years, I'd be redeveloping in PHP on responsive tools. I left M$ OS's for my business OS 2 years ago precisely because of freezes, slow downs and inexplicable changes taking weeks out of my productivity. Cost wasn't the issue, it was service. [Rant Over]

I'm aware there are 3 items to this, VirtualBox, Win7 & VS2010. It may be best for me to set up a Win2008 server VM and install VS2010 on that, I don't know at this point.

If anyone has any clues how to get VS2010 to respond in a timely fashion I'd love to hear them.

Craig

like image 44
Craig Avatar answered Sep 20 '22 16:09

Craig