Chunking: change the default chunk size to 10MB
authorOlivier Goffart <ogoffart@woboq.com>
Wed, 24 Feb 2016 15:02:17 +0000 (16:02 +0100)
committerOlivier Goffart <ogoffart@woboq.com>
Wed, 24 Feb 2016 15:25:45 +0000 (16:25 +0100)
As discussed with Klaas, this seems to be a better compromise.
10MB * 3 prarralel jobs = 30MB in memory, and to retry in case of
disconnection. Which is still reasonable.  And might make the upload
almost twice as fast on fast network where the amount of chunk is the
bottleneck (because of more server processing)

Relates to issue #4354

src/libsync/configfile.cpp

index 824c2bd7bbf6477c8ef9214f210308940dae2873..32d247570af2873cb805e77dbf5367968f15ecb9 100644 (file)
@@ -125,7 +125,7 @@ int ConfigFile::timeout() const
 quint64 ConfigFile::chunkSize() const
 {
     QSettings settings(configFile(), QSettings::IniFormat);
-    return settings.value(QLatin1String(chunkSizeC), 5*1024*1024).toLongLong(); // default to 5 MiB
+    return settings.value(QLatin1String(chunkSizeC), 10*1000*1000).toLongLong(); // default to 10 MB
 }
 
 QString ConfigFile::transmissionChecksum() const