From: Jay Freeman (saurik) Date: Thu, 12 Jun 2014 03:58:41 +0000 (-0700) Subject: If we have a lot of memory, increase MaxParallel. X-Git-Tag: v1.1.10~6 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/ce1901de9285ff79abf116cf71ef718deaca5faa If we have a lot of memory, increase MaxParallel. --- 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();