From 47711af35816f245f564e8a398117c2ff81add4b Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Wed, 5 Jun 2013 15:55:39 -0700 Subject: [PATCH] Ratelimit multi subscribe bubble render calls. Since a single render call renders all items, we only need to call this once, after all items have been added. --- r2/r2/public/static/js/multi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/public/static/js/multi.js b/r2/r2/public/static/js/multi.js index 88787c933..a2a2b1f7b 100644 --- a/r2/r2/public/static/js/multi.js +++ b/r2/r2/public/static/js/multi.js @@ -387,7 +387,7 @@ r.multi.MultiSubscribeBubble = r.ui.Bubble.extend({ initialize: function() { this.listenTo(this, 'show', this.load) - this.listenTo(r.multi.mine, 'reset add', this.render) + this.listenTo(r.multi.mine, 'reset add', _.debounce(this.render, 100)) r.ui.Bubble.prototype.initialize.apply(this) },