Skip to content

Commit

Permalink
Build: Windows: Improve dependency download speed
Browse files Browse the repository at this point in the history
Invoke-WebRequest enables a progress bar by default
which slows down the requests a lot. Disabling these makes the build run
much faster.

Source:
- https://stackoverflow.com/a/43477248
- Interactive testing
  • Loading branch information
hoffie committed Dec 9, 2023
1 parent 135e944 commit 3cc4318
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/autobuild/windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ param(
# Fail early on all errors
$ErrorActionPreference = "Stop"

# Invoke-WebRequest is really slow by default because it renders a progress bar.
# Disabling this, improves vastly performance:
$ProgressPreference = 'SilentlyContinue'

$QtDir = 'C:\Qt'
$ChocoCacheDir = 'C:\ChocoCache'
$DownloadCacheDir = 'C:\AutobuildCache'
Expand Down
4 changes: 4 additions & 0 deletions windows/deploy_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ param (
# Fail early on all errors
$ErrorActionPreference = "Stop"

# Invoke-WebRequest is really slow by default because it renders a progress bar.
# Disabling this, improves vastly performance:
$ProgressPreference = 'SilentlyContinue'

# change directory to the directory above (if needed)
Set-Location -Path "$PSScriptRoot\..\"

Expand Down

0 comments on commit 3cc4318

Please sign in to comment.