diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-06-11 20:58:41 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-06-11 21:00:36 -0700 |
commit | ce1901de9285ff79abf116cf71ef718deaca5faa (patch) | |
tree | cdca75a003da38a82a92333d5e8908253e48c09a | |
parent | 7d3660da3876d865a8525c868c2c74c6b6a04921 (diff) |
If we have a lot of memory, increase MaxParallel.
-rw-r--r-- | MobileCydia.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index bbcae32..9e305af 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(); |