ensure_bootstrap: bootstrap tools in parallel

Running each bootstrap in serial seriously slows things down, and it
gets worse as we add more.  On my very expensive desktop, the no-op
case takes 5 seconds.  When running in parallel, it's now ~1.5 sec.

Change-Id: I4304fddf22ef5a718218a807aeb05e08e5418bb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3245746
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
changes/46/3245746/2
Mike Frysinger 4 years ago committed by LUCI CQ
parent 300d9bed41
commit 45a7f406ab

@ -40,14 +40,17 @@ source "$base_dir/cipd_bin_setup.sh"
cipd_bin_setup
# Sync "gsutil.py".
python "$base_dir/gsutil.py" -- version 1> /dev/null
python "$base_dir/gsutil.py" -- version 1> /dev/null &
# Sync all the pylint versions.
for script in "$base_dir"/pylint-[0-9].[0-9]; do
# We have to silence stderr too because newer pylint versions will emit
# a spurious log to tell us what pylintrc file it's using. Ugh.
"$script" --version >/dev/null 2>&1
"$script" --version >/dev/null 2>&1 &
done
# Run bootstraps in parallel to help speed things up.
wait
# Cleanup.
find "$base_dir" -iname "*.pyc" -delete || true

Loading…
Cancel
Save