]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Set discovery thread priority to low #5017
authorChristian Kamm <mail@ckamm.de>
Tue, 5 Jul 2016 11:53:57 +0000 (13:53 +0200)
committerChristian Kamm <mail@ckamm.de>
Mon, 12 Sep 2016 12:09:13 +0000 (14:09 +0200)
(cherry picked from commit bd7ec196443202501d76f12db5f243e1efb7cf57)

src/libsync/syncengine.cpp

index 85d7e9b92ce4e5c45219c1afdb8239ebadf45211..a9f9701de333ef17691a16aa8945ed2da239ec48 100644 (file)
@@ -765,7 +765,11 @@ void SyncEngine::startSync()
 
     qDebug() << "#### Discovery start #################################################### >>";
 
-    _thread.start();
+    // Usually the discovery runs in the background: We want to avoid
+    // stealing too much time from other processes that the user might
+    // be interacting with at the time.
+    _thread.start(QThread::LowPriority);
+
     _discoveryMainThread = new DiscoveryMainThread(account());
     _discoveryMainThread->setParent(this);
     connect(this, SIGNAL(finished(bool)), _discoveryMainThread, SLOT(deleteLater()));