From 72b2b7b22c9836f527b07a827763b28ba410a255 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 7 Jan 2013 08:44:55 -0800 Subject: [PATCH] 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 --- src/workflow/ArcanistBranchWorkflow.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);