diff --git a/converse.js b/converse.js index 07593cde2..e0865331d 100644 --- a/converse.js +++ b/converse.js @@ -3851,14 +3851,14 @@ this.model.on("reset", this.reset, this); }, - update: function () { + update: _.debounce(function () { var $count = $('#online-count'); $count.text('('+converse.roster.getNumOnlineContacts()+')'); if (!$count.is(':visible')) { $count.show(); } return this.showHideFilter(); - }, + }, 300), render: function () { this.$el.html(converse.templates.roster({ diff --git a/spec/profiling.js b/spec/profiling.js index 78c167e3b..f7f742bdf 100644 --- a/spec/profiling.js +++ b/spec/profiling.js @@ -50,7 +50,5 @@ it("contacts in a very large roster change their statuses", $.proxy(function() { }, converse)); - }); - }));