backbone.search
backbone.search copied to clipboard
Don't set comparator on search result collection before adds
Backbone will resort the collection every time you add a model! This becomes incredibly inefficient. Move the comparator setting once the search collection is built and then perform the sort once. (Although again, I don't think you should set an attribute on it.)