logoalt Hacker News

kichikyesterday at 10:45 PM3 repliesview on HN

Invoke-WebRequest is also very slow if you forget to disable the progress bar with $ProgressPreference = 'SilentlyContinue'

PowerShell has some "interesting" design choices...


Replies

Lariscusyesterday at 11:06 PM

It also buffers the downloaded data completely into memory last time I checked. So downloading a file bigger than the available RAM just doesn't work and you have to use WebClient instead.

Another fun one is Extract-Archive which is painfully slow while using the System.IO.Compression.ZipFile CLR type directly is reasonably fast. Powershell is really a head scratcher sometimes.

show 3 replies
orthoxeroxyesterday at 11:03 PM

Wasn't something like npm much slower as well when it showed a progress indicator by default?

archi42yesterday at 10:50 PM

This is atrocious. I get it, some things are less trivial than they seem - but I would be ashamed for shipping something like this, and even more for not fixing it.