From ce1901de9285ff79abf116cf71ef718deaca5faa Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 11 Jun 2014 20:58:41 -0700 Subject: [PATCH] If we have a lot of memory, increase MaxParallel. --- MobileCydia.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index bbcae324..9e305afe 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -10336,6 +10336,11 @@ int main(int argc, char *argv[]) { else Machine_ = machine; + int64_t usermem; + size = sizeof(usermem); + if (sysctlbyname("hw.usermem", &usermem, &size, NULL, 0) == -1) + usermem = 0; + SerialNumber_ = (NSString *) CYIOGetValue("IOService:/", @"IOPlatformSerialNumber"); ChipID_ = [CYHex((NSData *) CYIOGetValue("IODeviceTree:/chosen", @"unique-chip-id"), true) uppercaseString]; BBSNum_ = CYHex((NSData *) CYIOGetValue("IOService:/AppleARMPE/baseband", @"snum"), false); @@ -10492,7 +10497,7 @@ int main(int argc, char *argv[]) { // XXX: this timeout might be important :( //_config->Set("Acquire::http::Timeout", 15); - _config->Set("Acquire::http::MaxParallel", 3); + _config->Set("Acquire::http::MaxParallel", usermem >= 384 * 1024 * 1024 ? 16 : 3); /* }}} */ /* Color Choices {{{ */ space_ = CGColorSpaceCreateDeviceRGB(); -- 2.45.2