From e608ae1d10fcee44f7b59c369453cc1f795adcd6 Mon Sep 17 00:00:00 2001 From: Chad Austin Date: Thu, 3 Feb 2022 11:44:47 -0800 Subject: [PATCH] prefetch projects in the background Summary: There's no reason to block a getdeps build on prefetching its sources, so issue all prefetches in the background. Reviewed By: genevievehelsel Differential Revision: D33855396 fbshipit-source-id: 1ba01b0587e9bc0e74e6bba5b8571af76bf2516d --- build/fbcode_builder/getdeps/copytree.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build/fbcode_builder/getdeps/copytree.py b/build/fbcode_builder/getdeps/copytree.py index bcec12f5c..328ab84b9 100644 --- a/build/fbcode_builder/getdeps/copytree.py +++ b/build/fbcode_builder/getdeps/copytree.py @@ -59,7 +59,9 @@ def prefetch_dir_if_eden(dirpath): return glob = f"{os.path.relpath(dirpath, root).replace(os.sep, '/')}/**" print(f"Prefetching {glob}") - subprocess.call(["edenfsctl", "prefetch", "--repo", root, "--silent", glob]) + subprocess.call( + ["edenfsctl", "prefetch", "--repo", root, "--silent", glob, "--background"] + ) PREFETCHED_DIRS.add(dirpath)