Quellcode durchsuchen

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.
Markus Goetz vor 9 Jahren
Ursprung
Commit
8c5ea8dc90
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/libsync/owncloudpropagator.cpp
  2. 2 0
      src/libsync/propagateupload.h

+ 1 - 1
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()));
             }

+ 2 - 0
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.