Fork me on GitHub
#community-development
<
2023-05-22
>
Indy Singh21:05:43

Hey, not sure if this is the right channel. But I had to execute this script recently https://download.clojure.org/install/win-install-1.11.1.1165.ps1 and noticed it was dog slow because it had a progress bar (https://github.com/PowerShell/PowerShell/issues/2138). If the script can be amended to set $ProgressPreference = "SilentlyContinue" it reduces the time taken to download the ZIP from 30 seconds to 270ms on my machine.

Measure-Command {Invoke-WebRequest -Uri "" -OutFile a.zip}
TotalSeconds      : 30.1399345

Measure-Command {$ProgressPreference = "SilentlyContinue"; Invoke-WebRequest -Uri "" -OutFile b.zip}
TotalSeconds      : 0.2708882
Cheers 👍

seancorfield22:05:07

#CFN4QDHPS would be the right channel for this.

👍 2
Indy Singh08:05:17

@U064X3EF3 typically with PowerShell scripts we would put the actions preferences at the top so they are all together. This setting would also improve Expand-Archive so I as long as the preference is set before any calls to either Invoke-WebRequest or Expand-Archive it will do the desirable thing. I didn't realise the script lived on GH otherwise I would have sent in a PR. Cheers 👍

seancorfield14:05:59

Contrib projects don't accept PRs (but we can't turn that GH feature off). See https://clojure.org/dev/dev for the contribution process on core & contrib libraries. Suggestions can always be posted at https://ask.clojure.org/

👍 2