Skip to content

Commit

Permalink
Merge pull request #7161 from nextcloud/bugfix/changeDefaultChunkSize
Browse files Browse the repository at this point in the history
changing default chunk size to 100MB
  • Loading branch information
mgallien authored Sep 26, 2024
2 parents 42c89bd + 570749c commit c44d29d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/syncoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OWNCLOUDSYNC_EXPORT SyncOptions
* 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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/testuploadreset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c44d29d

Please sign in to comment.