7

Closed

Potential Memory Issues Running JS Tests in VS2012

description

I've noticed that when we run tests in our solution, the following EXEs skyrocket in memory:

vstest.discoveryengine..x86.exe
vstest.executionengine.x86.exe

It's not easy to tell, but it seems like once the JS tests are being discovered or executed, the memory consumption goes up.

Is this something that others have seen? Our solution has about 3000 tests, 800 of which are JS tests.

file attachments

Closed May 16 at 2:40 PM by mmanela

comments

jasonrbock wrote Nov 5, 2013 at 5:02 PM

On the advice of my colleagues, I disabled the Chutzpah extension, and it made a HUGE difference. The discovery engine stays around 30 MB, and the execution engine never goes above 100 MB. With the extension in place, they'd both easily go over 1 GB.

mmanela wrote Nov 5, 2013 at 5:41 PM

That is definitely a problem. Could you share the source code (or something at least that shows a repro) so I can test locally.

jasonrbock wrote Nov 5, 2013 at 5:52 PM

Yeah, I can't share the code as it's for a client. I'll see if I can get someone on our team to do that....

mikemccaughan wrote Nov 5, 2013 at 6:43 PM

I've attached a simple project which demonstrates the issue.

With just the CS test, vstest.discoveryengine.x86.exe consumes ~15MB. With Chutzpah & TS, ~225MB.
With just the CS test, vstest.executionengine.x86.exe consumes ~9MB. With Chutzpah & TS, ~183MB.

Hope that helps.

mmanela wrote Nov 5, 2013 at 7:18 PM

That helps a lot. I will look into this.

mmanela wrote Dec 2, 2013 at 12:04 AM

I took an initial look into this and I am having trouble seeing where this high memory consumption is coming from. I see the same thing when I run the chutzpah.console.exe. Since nothing jumped out at me at me I will defer further investigation until after my next release.

jasonrbock wrote Feb 7 at 3:34 PM

Has this been addressed with the 3.0 release?

mmanela wrote Feb 7 at 4:05 PM

No, I don't believe so. I wasn't able to pinpoint the issue but my guess is that its do to the runtime I host for compiling TypeScript/CoffeeScript.

In the 3.1 release coming out soon I made a change so that if you don't use TS or CS then I won't load that engine.

In a future release I will hopefully stop requiring that I host the engine and you can specify a path to tsc.exe for example.

mmanela wrote Mar 12 at 5:41 PM

I released version 3.2 (http://matthewmanela.com/blog/chutzpah-3-2-a-smarter-approach-to-compilation/) which included a new compile setting which you should use instead of the former built in compilation approach. Now you provide chutzpah with how to compile which will be faster and not hog memory like the former approach