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
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.