Speeding up Visual Studio for Web Development

I’ve been dealing with some pretty time-consuming performance issues while using Visual Studio inside of Parallels to develop web applications.

I did some performance tweaks to my Parallels VM, but I still had performance issues. I did some further digging and found out that a feature called Browser Link in Visual Studio was causing the slowdown.

Browser Link is actually a pretty nifty feature built into Visual Studio. It connects to all open browsers on your machine and injects some Javascript code that can perform certain tasks. Let’s say you need to test how an application looks in Internet Explorer, Firefox and Chrome. With Browser Link you can have all those browsers open at the same time, and with one click in Visual Studio you can automatically refresh all those browsers at once when you make changes, instead of manually refreshing each browser.

While this functionality is great, for me it isn’t worth the performance hit I was seeing.

Screenshot 2015-02-26 17.46.14

Task Manager while Browser Link is enabled

Visual Studio would use around 32.1% of my CPU, and Chrome would use around 14.3%. As I’m running Windows inside of a virtual machine where the host is also using the CPU, I’ve noticed in the past that anything that uses this much CPU starts to slow down overall machine performance.

After turning off Browser Link..

Screenshot 2015-02-26 17.54.50

 

I now see that Task Manager looks a little more friendly.

Screenshot 2015-02-26 17.55.56

Task Manager after disabling Browser Link

Time to get back to work!

 

 

Speeding up Parallels

I was getting pretty frustrated recently that my development environment wasn’t feeling particularly snappy.

My .NET development environment is a Macbook Pro running Windows 8.1 in Parallels Desktop, and up until recently it had been running pretty smoothly. But in recent weeks, I’d noticed a major slowdown – it had got to the point where I was experiencing a noticeable lag when typing.

I did some digging and found this KB article on the Parallels site explaining some of the ways to increase the performance of a virtual machine.

I followed the steps, and removed a bunch of software I wasn’t using. I even went as far as to replace my installation of VS2013 Ultimate with VS2013 Community – which trimmed down HDD space a little bit, and I assume reduced overhead some.

I also had VS2012 and VS2010 installed for legacy projects that I am no longer working on – and things are running pretty snappy!

Grumble about ASP MVC 5

Prior warning – this is just a grumble post about an annoyance I have with the latest version of ASP MVC.

I recently wanted to bring SignalR into an application as one of the modules calls for close to real-time functionality in the browser. Before I bring in new libraries, I like to make completely separate, green-pasture prototype applications that resemble the feature I’d like to make in production.

I do this so I’m not “fudging the bucket” with prototype code that I’ll eventually just rip out of source control. If I ever need to work on a similar feature in another application in the future – I can refer back to my prototype that only contains the functionality I need, instead of mining through production code where I likely had to tweak things to get the functionality to work.

So I go to create a brand new ASP MVC application to build my prototype SignalR application, but I’m only presented with the following options:

  • Create a completely empty MVC 5 application, with no handy features like JS/CSS bundling or filter configuration.
  • Create a sample MVC5 application that is an actual application that you have to spend time ripping out to get only the functions you need. (And pray you don’t pull out something that breaks a dependency.)

With only these two options, I’m spending time either bringing in dependencies or ripping them out before I can get on with what I really wanted to do.

It would be nice if there were a bit more to the configuration when creating a new ASP MVC project. I ended up making my own project template that I can use again in the future.