Ember.js: Memory leak with Ember 2.13 and partials

Created on 7 Jun 2017  路  7Comments  路  Source: emberjs/ember.js

Rendering the same partial multiple times keeps adding entries to a "glimmer-environment" cache (container.lookup('service:-glimmer-environment').constants) which is causing a memory leak.

eg.
https://ember-twiddle.com/d6644950e2755c960c6cddbbe07d78b4

Click the "show/hide" button and notice that the value for glimmerEnv.constants.strings.length keeps going up.

Bug Has Reproduction memory leak

Most helpful comment

Thanks for reporting and including a nice reproduction!

FWIW, I did just test canary (which uses a pretty different architecture within glimmer and is slated to be in Ember 2.15), and this issue doesn't exist there.

All 7 comments

Thanks for reporting and including a nice reproduction!

FWIW, I did just test canary (which uses a pretty different architecture within glimmer and is slated to be in Ember 2.15), and this issue doesn't exist there.

Will this be fixed for 2.13 and LTS too?

There is no mention here of 2.12, does this bug also affect 2.12?

No, just 2.13 (and 2.14)

@rwjblue is the fix backportable or still found in 2.14?

The specific fix for 2.14 is not obvious, it's only fixed in 2.15+ due to a large architectural refactor in glimmer (aka it wasn't identified as a bug and fixed).

If someone has the time to dig into the specific version of glimmer-vm and fix, we would definitely appreciate the help...

Closing this as it was fix for 2.15+ and current LTS is 2.16

Was this page helpful?
0 / 5 - 0 ratings