mercredi 14 octobre 2015

Memory leak in ember-qunit

I've got a memory leak in my Ember-CLI app during unit testing.

I've got a pretty large test suite consisting of some 300+ tests. When I run all the tests in the suite at once, Chrome reaches it's per-tab 1,6 GB memory limit and crashes. Clearly that is unacceptable.

I've already collected a memory profile from running a single test. After test pass is complete, I see a lot of instances of Class, not really sure what they are. There are also some HTMLBarsMorph objects. I attach below some screenshots from the memory snapshot below.

Question: How do I diagnose a leak in an Ember-CLI application? Specifically, how could I find out what exactly is the garbage left on the heap - instances of Class, HTMLBarsMorph both seem pretty commonplace, so it doesn't help much.

It seems that some of the objects have _state set to "destroying". That sounds wrong, no? I guess they should be in "destroyed" state, if anything.

heap snapshot 1 heap snapshot 2 heap snapshot 3 heap snapshot 4




Aucun commentaire:

Enregistrer un commentaire