4 ms·
Hi there! Author of the post that's the subject of this thread here :) Two questions: 1. Does your machine use a spinning disk for its system drive, or SSD? I
by bitcrazed 8y ago
Hi there! Author of the post that's the subject of this thread here :)
Two questions:
1. Does your machine use a spinning disk for its system drive, or SSD? If the former, that's slowing you down more any anything else. STRONGLY recommend moving to SSD system drive if so.
2. Have you tried `powershell /noprofile` from Run dialog or Cmd? If you're still seeing PowerShell take > 600ms to load and start, likely something else is up.
If you're expecting PowerShell to load faster than ~600ms, your expectations are likely a little out of whack - Cmd loads so fast because it's tiny and - relatively speaking - as dumb as a stump. PowerShell is a .NET language, and so loads the CLR, so incurs some overhead vs. Cmd, but it does A TON more that'll save you more time and effort over-all than any amount of time saving vs. starting Cmd.
HTH.
- bitcrazed 8y agoOh … and re. Hyper - its awesome and beautiful, but it's an Electron app which means you're first loading and starting Electron base, then Chromium's JS & HTML engines, then loading A TON of JavaScript which has to be tokenized, parsed, compiled and executed every time you run it. This doesn't come cheap. Electron consumes & fills ~100MB working set just to get rolling, plus several more tens of MB to load, compile and execute. For example, on my 16GB Core-i7 Surface Pro 4, starting a single Hyper instance connected to Cmd, requires 134MB. Starting Console takes < 1s, and consumes 6MB.
- romwell 8y agoWell, re: >1. Does your machine use a spinning disk for its system drive, or SSD? This really shouldn't be a question regarding the performance of a terminal window. If cmd.exe starts fast regardless, then so should Powershell if it is going to replace it. And on that note, on a new laptop with an SSD I can see a difference between Powershell and cmd.exe execution-to-prompt-ready time (however small that latency is). As long as that's the case, Powershell simply isn't a viable replacement for cmd.exe
- bitcrazed 8y agoI am not comparing performance of a terminal window - Cmd and PowerShell both run connected to the same terminal app - Windows Console (conhost.exe) as discussed ad nauseum in the posts that are the subject of this thread. But you're comparing a 30+ year old command-line shell that was built in 1989 to primarily provide compatibility with MS-DOS, with a modern object-based shell that runs atop the .NET CLR and provides VASTLY more power and capability than the MUCH older, simpler, shell that it supersedes. It's like comparing startup perf of Notepad and VSCode … and saying that you won't use VSCode until it starts up as quickly as Notepad, even if VSCode saves you HOURS more per day/week than using Notepad would.
- romwell 8y agoSure, sure, more functionality. That's not an excuse for the startup time of a shell not being instantaneous on a modern system. To harness the power, I write Powershell scripts (yay no more batch files), but it's just too annoying to experience the startup lag to use the shell for the simplest tasks (e.g. simply running a console application). That shouldn't be the case. PS: "modern object-oriented" was all the hype in the 80-s. It's not an excuse for a performance hit today :)
- bitcrazed 8y agoYou mention Hyper. Are you running PowerShell connected to Hyper or Console? If you're running Hyper, note that this alone takes 6s to (warm) start Cmd on my 16GB RAM Core-i7 Surface Pro 4. PowerShell takes ~1.2s to (warm) start connected to Console, while also starting a half dozen modules and scripts in my PowerShell user profile. PowerShell takes < .7s to start when run with `-NoProfile`