Adjust upload manager

This commit is contained in:
Ali 2021-01-25 21:28:25 +05:00
parent 7b9b861356
commit 1084c5a198
3 changed files with 4 additions and 3 deletions

View File

@ -432,6 +432,7 @@ public final class ChatImportActivityScreen: ViewController {
let signal = Signal<TempBoxFile?, NoError> { subscriber in
let tempFile = TempBox.shared.tempFile(fileName: entry.1)
if SSZipArchive.extractFileFromArchive(atPath: archivePath, filePath: entry.0.path, toPath: tempFile.path) {
//print("Extract \(entry.0.path) to \(tempFile.path)")
subscriber.putNext(tempFile)
subscriber.putCompletion()
} else {

View File

@ -171,7 +171,7 @@ private final class MultipartUploadManager {
self.bigParts = true
} else if useLargerParts {
self.bigParts = false
self.defaultPartSize = 128 * 1024
self.defaultPartSize = 192 * 1024
self.bigTotalParts = nil
} else {
self.bigParts = false
@ -210,7 +210,7 @@ private final class MultipartUploadManager {
} else {
self.bigParts = false
if self.useLargerParts {
self.defaultPartSize = 128 * 1024
self.defaultPartSize = 192 * 1024
} else {
self.defaultPartSize = 16 * 1024
}

View File

@ -144,7 +144,7 @@ private final class MultiplexedRequestManagerContext {
}
private func updateState() {
let maxRequestsPerWorker = 2
let maxRequestsPerWorker = 3
let maxWorkersPerTarget = 4
var requestIndex = 0