PowerShell 启动慢 - V2EX
source link: https://www.v2ex.com/t/845128
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
pwsh
:powershell7.15; powershell
: powershellv1.0,不知道啥版本,就 win11 自带的 :
- 配置
oh-my-posh
+posh-git
两个模块,启动速度 1000ms-1100ms - 把
$profile
内容全部注释掉,启动速度,启动速度 500ms pwsh -noprofile
有明显停顿感(但感觉应该没 500ms 这么夸张了)powershell -noprofile
几乎没有延迟
这个延迟太高了,不知道有什么优化方法没,stackoverflow上提到.net 框架升级,感觉不怎么靠谱,因为powershell -noprofile
这个指令基本没啥延迟,所以感觉应该是配置文件优化的问题,有 v 友懂如何优化吗
ersic 17 小时 28 分钟前 3
hope4tomorrow 16 小时 36 分钟前
Tumblr 16 小时 28 分钟前
nightwitch 16 小时 21 分钟前
如果对速度有要求建议自己写点 alias 就行了,主题之类的会很慢
creanme 16 小时 20 分钟前
tuutoo 12 小时 43 分钟前
也是慢的不能忍受,看了下二楼这个好像不错,准备试一下。
h404bi 11 小时 40 分钟前
356693212 11 小时 35 分钟前
CokeMine 11 小时 30 分钟前
加上 -noprofile 了肯定不是一些插件的问题
网上搜了一些 用什么 ngen.exe 什么的方法都无效
skinny 11 小时 28 分钟前
POWERSHELL_TELEMETRY_OPTOUT=1
POWERSHELL_UPDATECHECK=Off
再慢就没有办法了。
duke807 11 小时 16 分钟前
Lemeng 11 小时 6 分钟前
beetlerx 10 小时 42 分钟前
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK