Bug 955662 - The stats service shouldn't block the UI for more than 15ms, r=nhnt11.
authorFlorian Quèze <florian@instantbird.org>
Sun, 13 Oct 2013 22:53:04 +0200
changeset 17298 bed8c2e0eb6a724370caf0ee31d7abfd6c0c0270
parent 17297 74d5549f26ff148beaa31d408636d634a0e013ee
child 17299 211c86885af24058f73d8cc640b93389d5cceb15
push id1151
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:50:32 +0000
treeherdercomm-aurora@267d8e9143d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnhnt11
bugs955662
Bug 955662 - The stats service shouldn't block the UI for more than 15ms, r=nhnt11.
im/components/ibConvStatsService.js
--- a/im/components/ibConvStatsService.js
+++ b/im/components/ibConvStatsService.js
@@ -234,17 +234,17 @@ ConvStatsService.prototype = {
   _pendingChats: [],
   // The last time an update notification was sent to observers.
   _lastUpdateNotification: 0,
   // Account ids from which chat room info has been requested.
   // We send an update notification if this is empty after adding chat rooms.
   _accountsRequestingRoomInfo: new Set(),
   _addPendingChats: function() {
     let begin = Date.now();
-    for (let time = 0; time < 40 && this._pendingChats.length;
+    for (let time = 0; time < 15 && this._pendingChats.length;
          time = Date.now() - begin) {
       let chat = this._pendingChats.pop();
       let accountId = chat.accountId;
       let chatList = this._chatsByAccountIdAndName.get(accountId);
       if (!chatList) {
         chatList = new Map();
         this._chatsByAccountIdAndName.set(accountId, chatList);
       }