From: Markus Goetz Date: Fri, 14 Oct 2016 12:23:55 +0000 (+0200) Subject: Propagator: Also upload more in parallel (#5230) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1059 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8c5ea8dc908a8429fbdb317e49754b5108df98e9;p=nextcloud-desktop.git Propagator: Also upload more in parallel (#5230) Fix for https://github.com/owncloud/client/issues/4986#issuecomment-227071801 This is before we have bundling at some point. --- diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 1ff550073..e86532346 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -529,7 +529,7 @@ void OwncloudPropagator::scheduleNextJob() } } if (_activeJobList.count() < maximumActiveJob() + likelyFinishedQuicklyCount) { - qDebug() << "Can pump in another request!"; + qDebug() << "Can pump in another request! activeJobs =" << _activeJobList.count(); if (_rootJob->scheduleNextJob()) { QTimer::singleShot(0, this, SLOT(scheduleNextJob())); } diff --git a/src/libsync/propagateupload.h b/src/libsync/propagateupload.h index 2be0212e9..f3375a11c 100644 --- a/src/libsync/propagateupload.h +++ b/src/libsync/propagateupload.h @@ -195,6 +195,8 @@ public: : PropagateItemJob(propagator, item), _startChunk(0), _currentChunk(0), _chunkCount(0), _transferId(0), _finished(false), _deleteExisting(false) {} void start() Q_DECL_OVERRIDE; + bool isLikelyFinishedQuickly() Q_DECL_OVERRIDE { return _item->_size < 100*1024; } + /** * Whether an existing entity with the same name may be deleted before * the upload.