From: epriestley Date: Mon, 7 Jan 2013 16:44:55 +0000 (-0800) Subject: Limit `arc branch` to 16 concurrent processes X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=72b2b7b22c9836f527b07a827763b28ba410a255;p=arcanist.git Limit `arc branch` to 16 concurrent processes Summary: Currently, this spawns 125 concurrent processes on my machine, which overflows some limit and gives me an error: PHP Warning: proc_open(): unable to create pipe Too many open files in /INSECURE/devtools/libphutil/src/future/exec/ExecFuture.php on line 491 Instead, limit parallelism to 16. The runtime is approximately the same for me, and dominated by other concerns (conduit calls). Test Plan: Ran `arc branch` successfully. Ran `arc branch --trace`, observed behavior. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D4336 --- diff --git a/src/workflow/ArcanistBranchWorkflow.php b/src/workflow/ArcanistBranchWorkflow.php index 3bb891b8..3394f14f 100644 --- a/src/workflow/ArcanistBranchWorkflow.php +++ b/src/workflow/ArcanistBranchWorkflow.php @@ -149,7 +149,7 @@ EOTEXT $branches = ipull($branches, null, 'name'); - foreach (Futures($futures) as $name => $future) { + foreach (Futures($futures)->limit(16) as $name => $future) { list($info) = $future->resolvex(); list($hash, $epoch, $tree, $desc, $text) = explode("\1", trim($info), 5);