mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Adjust upload manager
This commit is contained in:
parent
7b9b861356
commit
1084c5a198
@ -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 {
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ private final class MultiplexedRequestManagerContext {
|
||||
}
|
||||
|
||||
private func updateState() {
|
||||
let maxRequestsPerWorker = 2
|
||||
let maxRequestsPerWorker = 3
|
||||
let maxWorkersPerTarget = 4
|
||||
|
||||
var requestIndex = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user