From 41bbe7c51bfd72cd653be31805aefacd67c46212 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Thu, 5 Jul 2018 07:39:26 +0200
Subject: [PATCH] Decrease amount of loaded DMs to lower performance hit from
 re-opening DMs

---
 Resources/Scripts/code.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Resources/Scripts/code.js b/Resources/Scripts/code.js
index 106bf15a..f10a9a7d 100644
--- a/Resources/Scripts/code.js
+++ b/Resources/Scripts/code.js
@@ -1393,6 +1393,13 @@
     };
   }
   
+  //
+  // Block: Decrease amount of loaded DMs to avoid massive lag from re-opening them several times.
+  //
+  if (ensurePropertyExists(TD, "services", "TwitterConversation", "CONVERSATION_ENTRY_COUNT")){
+    TD.services.TwitterConversation.CONVERSATION_ENTRY_COUNT = 20;
+  }
+  
   //
   // Block: Fix broken horizontal scrolling of column container when holding Shift. TODO Fix broken smooth scrolling.
   //