Performance fix. Don't loop through whole roster when only one item changed. updates #151

This commit is contained in:
JC Brand 2014-10-27 21:41:41 +01:00
parent c2063eb1a7
commit b2b4474439

View File

@ -3493,7 +3493,8 @@
rosterHandler: function (items, item) {
converse.emit('roster', items);
this.clearCache(items);
_.each(items, function (item, index, items) {
var new_items = item ? [item] : items;
_.each(new_items, function (item, index, items) {
if (this.isSelf(item.jid)) { return; }
var model = this.get(item.jid);
if (!model) {