from Ryan Olds:
While tracking down long load times we noticed a lot of stale event listeners related to Backbone.Collections that were not being cleaned up. Backbone.Collection binds event listeners to every model that is added to it. Unless the models are removed or the Collection is reset those event listeners remain on the models, a performance problem (event dispatching) and a memory leak.
To fix this without breaking compatibility with community plugins, we need to create new versions of some of the functions of adaptModel which will return an array instead of a collection, update any core code that uses them and then add deprecation warnings to the existing functions to alert plugin developers that they will need to update any code that uses the old versions.
The functions that need changing are:
findDescendants
getAvailableChildren
getParents
from Ryan Olds:
To fix this without breaking compatibility with community plugins, we need to create new versions of some of the functions of adaptModel which will return an array instead of a collection, update any core code that uses them and then add deprecation warnings to the existing functions to alert plugin developers that they will need to update any code that uses the old versions.
The functions that need changing are:
findDescendantsgetAvailableChildrengetParents