ember-best-practices / memory-leak-examples

Examples of memory leaks and common patterns that cause them
223 stars 16 forks source link

Issue with Exercise 1 #17

Open jackson-dean opened 6 years ago

jackson-dean commented 6 years ago

Following along with exercise 1, when traversing the snapshot retainers, there is not an obvious _data property to be found which could be used to discover the problem. I'm not sure if the issue is because of changes to Chrome or changes to Ember, but the only way to find the source of the memory leak is to look at the module's application code directly. Although the container is retained in memory, there is no way to discover the source from what is presented in the heap snapshot.

trentmwillis commented 6 years ago

Hmm, did you install dependencies using yarn? In general, the code for the exercises shouldn't have changed which likely means that Chrome may have changed and we'll need to update the guides.

jackson-dean commented 6 years ago

Yep, I ran yarn install. I believe the change is in chrome. Something to do with how weak maps are retained and presented in the heap snapshot. It has completely obfuscated the source of the leak to the point that it is unusable even for the simplest of examples.
https://bugs.chromium.org/p/chromium/issues/detail?id=827718

crixx commented 6 years ago

I agree. With the current version of Chrome (Version 69.0.3497.100) it's impossible to find memory leaks as explained in the guide. The guide was our last hope to find the reason for the memory leaks which are blowing up our build after having switched to the new ember test-style... and there seems to be no other source of information about finding memory leaks in ember apart from this guide 😞

Any hints or ideas?