For the record: how much "garbage collection" does DS actually do?


Lucky enough to have a production app running to the point where efficiency concerns have come to the forefront.

The biggest thing that has stood out is is the number of hasMany and belongsTo records that get stuck in the store after the main record is unloaded/deleted/destroyed.

Since my understanding of this level of the Ember.js ecosystem is limited, I’m very interested to know just how much of the cleanup Ember will do, and how much we should do manually?

A bit of background:

message model has three async belongsTo relationships. When calling deleteRecord or unloadRecord, I don’t see any attempts by Ember to similarly unload or delete the relationships. Is this meant to be handled by Ember, or is it my responsibility?

Another example:

analytic model has hasMany relationship with message. Same thing. Is it a deficit in how I set up my model that Ember doesn’t auto-delete/destroy/unload, or is it actually expected that I do my own cleanup?

Any help on this issue is greatly appreciated!