From 4aadc00bd609294b349cc58ce615678db6ddb44d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philipp=20H=C3=B6rist?= <philipp@hoerist.com>
Date: Sun, 21 Jan 2018 20:45:32 +0100
Subject: [PATCH] Revert "Improve speed of Windows client"

This reverts commit 45e3139bd0a224e2a34f133849309afaab4c6338
---
 gajim/gui_interface.py | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/gajim/gui_interface.py b/gajim/gui_interface.py
index 60205245bf..d79066013c 100644
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -2342,14 +2342,10 @@ class Interface:
             # Otherwise, an exception will stop our loop
 
             if sys.platform == 'win32':
-                # On Windows process() calls select.select(), so we need this
-                # executed on each mainloop cycle
-                # On Linux only timeouts are checked in process(), so we use
-                # a timeout
-                GLib.idle_add(self.process_connections)
-                raise
+                timeout, in_seconds = 20, None
+            else:
+                timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
 
-            timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
             if in_seconds:
                 GLib.timeout_add_seconds(timeout, self.process_connections)
             else:
@@ -2636,16 +2632,15 @@ class Interface:
         self.instances['file_transfers'] = dialogs.FileTransfersWindow()
 
         GLib.timeout_add(100, self.autoconnect)
-
         if sys.platform == 'win32':
-            GLib.idle_add(self.process_connections)
+            timeout, in_seconds = 20, None
         else:
             timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT
-            if in_seconds:
-                GLib.timeout_add_seconds(timeout, self.process_connections)
-            else:
-                GLib.timeout_add(self.process_connections)
 
+        if in_seconds:
+            GLib.timeout_add_seconds(timeout, self.process_connections)
+        else:
+            GLib.timeout_add(timeout, self.process_connections)
         GLib.timeout_add_seconds(app.config.get(
                 'check_idle_every_foo_seconds'), self.read_sleepy)
 
-- 
GitLab