]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Propagator: Also upload more in parallel (#5230)
authorMarkus Goetz <markus@woboq.com>
Fri, 14 Oct 2016 12:23:55 +0000 (14:23 +0200)
committerGitHub <noreply@github.com>
Fri, 14 Oct 2016 12:23:55 +0000 (14:23 +0200)
Fix for https://github.com/owncloud/client/issues/4986#issuecomment-227071801

This is before we have bundling at some point.

src/libsync/owncloudpropagator.cpp
src/libsync/propagateupload.h

index 1ff550073d467bd5eff20da233f8b12f0f99f295..e86532346645fdced15dd65a549ab9e1f1096176 100644 (file)
@@ -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()));
             }
index 2be0212e9dfe452fb63cb0e3bd9a3993ab7b0fca..f3375a11cb47624eb34dbff39142fb2e8f301d63 100644 (file)
@@ -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.