There is plenty of looping in maria.SetView.prototype.handleDelete. The "j" loop could be removed if a tag property like "_maria_SetView_id" was added to each item model object and then a mapping from these ids to view objects was kept.
maria.SetView.prototype.handleDelete = function(evt) {
var childModels = evt.relatedTargets;
for (var i = 0, ilen = childModels.length; i < ilen; i++) {
var key = childModels[i]._maria_SetListView_id;
this.removeChild(this._mapping[key]);
delete this._mapping[key];
}
};
Need initialize and keep this mapping up-to-date throughout SetView's implementation and ensure it is destroyed correctly.
This is an optimization to consider when SetView proves itself as something useful that will stay around permanently.
There is plenty of looping in maria.SetView.prototype.handleDelete. The "j" loop could be removed if a tag property like "_maria_SetView_id" was added to each item model object and then a mapping from these ids to view objects was kept.
Need initialize and keep this mapping up-to-date throughout SetView's implementation and ensure it is destroyed correctly.
This is an optimization to consider when SetView proves itself as something useful that will stay around permanently.
Sure could use ES.next Map right about now.