From fb5b57836ece6da2d0136802ca0d08346638b9e2 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 3 Nov 2015 14:52:25 -0500
Subject: Multiple fixes to major performance issues with teams with 50+ users

---
 web/react/components/channel_loader.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/react/components/channel_loader.jsx')

diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index 55b4a55c0..edc13f7ab 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -38,7 +38,7 @@ export default class ChannelLoader extends React.Component {
 
         /* Set up interval functions */
         this.intervalId = setInterval(
-            function pollStatuses() {
+            () => {
                 AsyncClient.getStatuses();
             },
             30000
-- 
cgit v1.2.3-1-g7c22


From a26145ef91197ba374d525c947984ae672cbd94d Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 3 Nov 2015 15:11:16 -0500
Subject: Minor changes to statuses client code

---
 web/react/components/channel_loader.jsx | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

(limited to 'web/react/components/channel_loader.jsx')

diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx
index edc13f7ab..4fc115a92 100644
--- a/web/react/components/channel_loader.jsx
+++ b/web/react/components/channel_loader.jsx
@@ -30,19 +30,14 @@ export default class ChannelLoader extends React.Component {
         AsyncClient.getChannels(true, true);
         AsyncClient.getChannelExtraInfo(true);
         AsyncClient.findTeams();
-        AsyncClient.getStatuses();
         AsyncClient.getMyTeam();
+        setTimeout(() => AsyncClient.getStatuses(), 3000); // temporary until statuses are reworked a bit
 
         /* Perform pending post clean-up */
         PostStore.clearPendingPosts();
 
         /* Set up interval functions */
-        this.intervalId = setInterval(
-            () => {
-                AsyncClient.getStatuses();
-            },
-            30000
-        );
+        this.intervalId = setInterval(() => AsyncClient.getStatuses(), 30000);
 
         /* Device tracking setup */
         var iOS = (/(iPad|iPhone|iPod)/g).test(navigator.userAgent);
-- 
cgit v1.2.3-1-g7c22

