]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
changing default chunk size to 100MB
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 18 Sep 2024 14:54:03 +0000 (16:54 +0200)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Thu, 26 Sep 2024 08:56:53 +0000 (10:56 +0200)
goal is to have better performance and uniform behavior between all files clients

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/configfile.cpp
src/libsync/syncoptions.h
test/testuploadreset.cpp

index bba8a3a517c9716780d1fb6194159e80dfa7c1d2..d79bbd51fe3444545d95391195c293fbbc406f06 100644 (file)
@@ -244,7 +244,7 @@ int ConfigFile::timeout() const
 qint64 ConfigFile::chunkSize() const
 {
     QSettings settings(configFile(), QSettings::IniFormat);
-    return settings.value(QLatin1String(chunkSizeC), 10LL * 1000LL * 1000LL).toLongLong(); // default to 10 MB
+    return settings.value(QLatin1String(chunkSizeC), 100LL * 1024LL * 1024LL).toLongLong(); // 100MiB
 }
 
 qint64 ConfigFile::maxChunkSize() const
index 91ebf4f01531ecbe4586607fc27683c3dd959e10..b532b9ad3bcc114ea03cae45b054efefe84a5ab9 100644 (file)
@@ -55,7 +55,7 @@ public:
      * starting value and is then gradually adjusted within the
      * minChunkSize / maxChunkSize bounds.
      */
-    qint64 _initialChunkSize = 10 * 1000 * 1000; // 10MB
+    qint64 _initialChunkSize = 100LL * 1024LL * 1024LL; // 100MiB
 
     /** The target duration of chunk uploads for dynamic chunk sizing.
      *
index 2b5832198f4c257fdeb25f946e5173b6910c12a4..fe7f5873724ff671e655bca2a13129a1d044f5f0 100644 (file)
@@ -33,7 +33,7 @@ private slots:
                 {"chunking", "1.0"},
                 {"httpErrorCodesThatResetFailingChunkedUploads", QVariantList{500} } } } });
 
-        const int size = 100 * 1000 * 1000; // 100 MB
+        const auto size = 200LL * 1024LL * 1024LL; // 200 MiB
         fakeFolder.localModifier().insert("A/a0", size);
         QDateTime modTime = QDateTime::currentDateTime();
         fakeFolder.localModifier().setModTime("A/a0", modTime);