Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Kamm <kamm@incasoftware.de>2015-04-08 16:30:07 +0300
committerChristian Kamm <kamm@incasoftware.de>2015-04-08 16:43:49 +0300
commitadcf40afc33228f8c187adbca83dd0ff41a8e33d (patch)
tree0014560f56f5bf00b0ee4619d50fa0a71de091b0 /src
parentd986011067a32cea9cf6d3a76581fdfd3c12e4c8 (diff)
Discovery: Speed up initial run. #2796
Diffstat (limited to 'src')
-rw-r--r--src/libsync/syncengine.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsync/syncengine.cpp b/src/libsync/syncengine.cpp
index b9ef9c45c..d8fa74a89 100644
--- a/src/libsync/syncengine.cpp
+++ b/src/libsync/syncengine.cpp
@@ -608,11 +608,15 @@ void SyncEngine::startSync()
if (fileRecordCount >= 1 && isUpdateFrom_1_5) {
qDebug() << "detected update from 1.5" << fileRecordCount << isUpdateFrom_1_5;
// Disable the read from DB to be sure to re-read all the fileid and etags.
- csync_set_read_from_db(_csync_ctx, false);
+ _csync_ctx->read_remote_from_db = false;
} else {
- csync_set_read_from_db(_csync_ctx, true);
+ _csync_ctx->read_remote_from_db = true;
}
+ // This tells csync to never read from the DB if it is empty
+ // thereby speeding up the initial discovery significantly.
+ _csync_ctx->db_is_empty = (fileRecordCount == 0);
+
bool usingSelectiveSync = (!_selectiveSyncBlackList.isEmpty());
qDebug() << (usingSelectiveSync ? "====Using Selective Sync" : "====NOT Using Selective Sync");
if (fileRecordCount >= 0 && fileRecordCount < 50 && !usingSelectiveSync) {