3/16/2023 0 Comments Knackhq showhide![]() LeakyValue is retained by two different retention paths. Another object which I’ll call leakyKey is the corresponding key in the WeakMap, as in t(leakyKey, leakyValue). Why WeakMaps make the heap snapshots misleadingįor the purposes of this discussion, assume we have an object leakyValue that is stored as a value in a WeakMap named theWeakMap, and nowhere else. The big reason why the snapshots are pretty confusing is related to WeakMaps (which are used both by ember and by the browser’s own internals). destroyables, for example, is something Kris has already looked at and confirmed is benign. One of the hard things about tracking these leaks down is that the heap snapshot tools are being misled into showing real but irrelevant retaining paths. Glimmer was recompiling components unnecessarily, and that was causing the glimmer-vm’s stack to overflow. There was a different unbounded memory leak that was fixed in 3.1.1, but it would look different from the example above. A lot of what you’ll see there is actually cleaning up places where the test suite itself was leaking things, making the hunt for real framework leaks harder. ![]() Work is ongoing on this branch to clean up this issue. ![]() Basically some things are left around from the previous render and not cleared away until the next render. ![]() We are retaining more than necessary at the moment, but not an unbounded amount (as guessed). I got some help understanding this from resident browser-internals guru I will try to relate what I learned. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |