you're reading...

CoffeeScript (via WebEssentials)+ Visual Studio 2012 + Resharper 8.0 == memory headache!

Its been six months, time for a new post!

This one is more to brag than anything else, because I feel like a freaking rock star today 😀

Our latest project for a customer is an EmberJS application written in CoffeeScript with an ASP.NET WebAPI backend.  This isn’t necessarily new territory for us, we’ve been working with EmberJS since Spring and things have been great.  For this project though, we decided to make the switch from plain old JavaScript to CoffeeScript and we love it.

What we don’t love is the absolute memory hog that VS2012 + CoffeeScript (via WebEssentials 2012) + Resharper 8.0 have become.  Several times a day we’ll have to restart Visual Studio because its hit its memory cap. Speaking of which, hey Microsoft, why don’t you make it a nice shiny 64-bit application, huh?  I’ve got 32GB of RAM in this laptop!

Anyway, Friday was our Technical Debt day and I decided to see if I could do something about it.  We’re already running a custom build of WebEssentials, because we wanted to change how it chose when it would generate the .js files, since we didn’t want to check them into git.

Since this only just started when we made the switch to CoffeeScript, I figured that how they compile .coffee files was the culprit.  Sure enough, when I looked under the covers I discovered they’re using IE to do the compilation.  Its also possible that when I upgraded the compiler script used by WebEssentials that broke it as well, but I didn’t want to downgrade.

My solution, instead of using IE to do the compile, what if I integrate V8 into WebEssentials?  It took half a day to get the first test running, but it was worth it.  Now when I do a build of our solution the memory use stays static instead of increasing by as much as 100MB per build!

If you’re interested in getting the code for yourself, I’ve published my forked version of WebEssentials and made a clone of the ClearScript repositories on my Github account:

Oh yeah, so why do I mention Resharper?  In my early testing after getting the V8 engine integrated I still saw some increased memory use.  This went away after installing Resharper 8.1 beta, however it could have just been a fluke as a co-worker running Resharper 7 didn’t see the increased memory usage.


About James

I am a Senior Developer/Consultant for InfoPlanIT, LLC. I previously spent over 7 years as a Product Manager for what eventually became ComponentOne, a division of GrapeCity. While there, I helped to create ActiveReports 7, GrapeCity ActiveAnalysis, and Data Dynamics Reports.


One thought on “CoffeeScript (via WebEssentials)+ Visual Studio 2012 + Resharper 8.0 == memory headache!

  1. gud night dost

    Posted by ankur barman | September 2, 2014, 12:23 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: