4 ms·
PowerShell is not the fastest beast around but its not slow as some people try to portray it regularly. In my experience it usually boils down to: 1. Windows d
by majkinetor 5y ago
PowerShell is not the fastest beast around but its not slow as some people try to portray it regularly. In my experience it usually boils down to:
1. Windows defender (it slows down any file access by the factor of 10 at least)
2. Virtual machine / VDI (I had 5-10s startup time on my VDI)
3. Slow modules to load (particularly those that source ps1 files instead having everything in psm1, but this is easy to diagnose as you can start it without modules)
Other then that, I never had startup time longer then 1s with bunch of modules. While that is not ultra fast, its not slow either. I must have been using it on thousand+ different machines and OSes.
Furthermore, its incomparable to bash, since once started, you rarely have to load any external processes. As an example to get something from REST API and sort and convert to CSV you can use only pwsh cmdlets, while in bash you need to use curl, jq, sort, awk etc. just for this one command. So such scripts must be slower, particularly on Windows where processes are more expensive.