From 42515353c9edfe0ef0b7318fe81b59a530ba3d3c Mon Sep 17 00:00:00 2001 From: Aleksey Khoroshilov Date: Mon, 15 May 2023 17:37:34 +0000 Subject: [PATCH] Fix slow initial bootstrap on Windows. Invoke-WebRequest shows a Powershell progress bar which absurdly slow downs the download. See [1] for related discussion. Test on a fresh checkout: Measure-Command { cmd.exe /c update_depot_tools.bat | Out-Default } Before: TotalSeconds : 102.4310994 After: TotalSeconds : 36.3454104 [1] https://stackoverflow.com/questions/28682642/powershell-why-is-using-invoke-webrequest-much-slower-than-a-browser-download Change-Id: I1c6e0200f2b140e9b4c23bd80e8565ff73ee7584 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4532007 Auto-Submit: Aleksey Khoroshilov Reviewed-by: Robbie Iannucci Reviewed-by: Vadim Shtayura Commit-Queue: Vadim Shtayura Commit-Queue: Robbie Iannucci --- .cipd_impl.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/.cipd_impl.ps1 b/.cipd_impl.ps1 index 5c609eb93..3d04d34a0 100644 --- a/.cipd_impl.ps1 +++ b/.cipd_impl.ps1 @@ -106,6 +106,7 @@ $TmpPath = $CipdBinary + ".tmp." + $PID try { Write-Output "Downloading CIPD client for $Platform from $URL..." Retry-Command { + $ProgressPreference = "SilentlyContinue" Invoke-WebRequest -UserAgent $UserAgent -Uri $URL -OutFile $TmpPath }