Philipp Hörist pushed to branch master at gajim / gajim
Commits: 65d2284b by Philipp Hörist at 2017-09-23T10:10:36+02:00 Reduce PROCESS_TIMEOUT on Windows
If io_add_watch is available like on Linux, the PROCESS_TIMEOUT, is only used to check for timed out events.
On Window its also used to call select() on the socket, so we get pending data. We need this as low as possible otherwise Gajim on Windows feels painfully slow.
- - - - -
1 changed file:
- gajim/gui_interface.py
Changes:
===================================== gajim/gui_interface.py ===================================== --- a/gajim/gui_interface.py +++ b/gajim/gui_interface.py @@ -2309,7 +2309,12 @@ class Interface: app.idlequeue.process() except Exception: # Otherwise, an exception will stop our loop - timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT + + if sys.platform == 'win32': + 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: @@ -2566,7 +2571,11 @@ class Interface: self.instances['file_transfers'] = dialogs.FileTransfersWindow()
GLib.timeout_add(100, self.autoconnect) - timeout, in_seconds = app.idlequeue.PROCESS_TIMEOUT + if sys.platform == 'win32': + 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:
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/65d2284b59f00969c140b1d90e07b999680...
--- View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/65d2284b59f00969c140b1d90e07b999680... You're receiving this email because of your account on dev.gajim.org.