Closed mwasowski closed 2 years ago
@mwasowski yup, looking at that oh-my-posh only takes 29ms, it's going to be either Defender/virus scanner which blocks the execution (so add an exclusion) or posh-git which is set to true and takes a bit of time before printing the shell.
@JanDeDobbeleer Hm..I'll try to investigate the first part. As for the second, it's the same setup on both, yes, with posh-git, but also not in a repository folder.
@JanDeDobbeleer Ok, I added oh-my-posh.exe
to Virus & threat protection exclusions and it works as before. Thanks for the suggestion. I think it would make sense to add this to the migration FAQ in the docs.
For anyone wondering how to add file or folder to exclusion list, look at this article from Microsoft.
@mwasowski it's listed in the installation guide, but I agree, let me add it!
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Code of Conduct
What happened?
Hi,
After migrating from PowerShell module as recommended here I experience significant drop in performance of the shell.
Below you can see comparison between the same action (just pressing enter, not in repository, just home folder) happening before and after the transition to the new version.
Old: New:
Any ideas?
Kind regards, Michal
Theme
{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "blocks": [ { "alignment": "left", "newline": true, "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "background": "#d3d7cf", "foreground": "#000000", "style": "diamond", "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}} ", "type": "os" }, { "background": "#3465a4", "foreground": "#e4e4e4", "powerline_symbol": "\ue0b0", "properties": { "home_icon": "\uf7db", "style": "full" }, "style": "powerline", "template": "{{if eq .PWD \"~\" }} {{ path .Path .Location }} {{else}} \uf07c {{ path .Path .Location }} {{end}}", "type": "path" }, { "background": "#4e9a06", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#c4a000{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}", "{{ if gt .Ahead 0 }}#4e9a06{{ end }}", "{{ if gt .Behind 0 }}#89d1dc{{ end }}" ], "foreground": "#000000", "powerline_symbol": "\ue0b0", "properties": { "branch_icon": "\uf126 ", "fetch_stash_count": true, "fetch_status": true, "fetch_upstream_icon": true }, "style": "powerline", "template": "{{ if( .UpstreamIcon ) }} {{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }} {{ .BranchStatus }}{{ if .Working.Changed }} \uf044 {{ .Working.String }} {{ end }}{{ if and (.Staging.Changed) (.Working.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }} {{ end }}{{ if gt .StashCount 0}}\uf692 {{ .StashCount }} {{ end }}{{ if gt .WorktreeCount 0}} \uf1bb {{ .WorktreeCount }} {{ end }}", "type": "git" } ], "type": "prompt" }, { "alignment": "right", "segments": [ { "background": "#689f63", "foreground": "#ffffff", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "fetch_version": true }, "style": "diamond", "template": " {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} \uf898 ", "type": "node" }, { "background": "#00acd7", "foreground": "#111111", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "fetch_version": true }, "style": "diamond", "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \ue627 ", "type": "go" }, { "background": "#FFDE57", "foreground": "#111111", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "display_mode": "files", "fetch_version": true, "fetch_virtual_env": false }, "style": "diamond", "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} \ue235 ", "type": "python" }, { "background": "#FEAC19", "foreground": "#ffffff", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "display_mode": "files", "fetch_version": false }, "style": "diamond", "template": " {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} \uf0e7 ", "type": "azfunc" }, { "background_templates": [ "{{if contains \"default\" .Profile}}#FFA400{{end}}", "{{if contains \"Michał\" .Profile}}#f1184c{{end}}" ], "foreground": "#ffffff", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "display_default": false }, "style": "diamond", "template": " {{ .Profile }}{{ if .Region }}@{{ .Region }}{{ end }} \ue7ad ", "type": "aws" }, { "background": "#000000", "background_templates": [ "{{ if gt .Code 0 }}#cc2222{{ end }}" ], "foreground": "#d3d7cf", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "always_enabled": false, "display_exit_code": true }, "style": "diamond", "template": " {{ if gt .Code 0 }}\uf00d {{ .Meaning }}{{ else }}\uf42e{{ end }} ", "type": "exit" }, { "background": "#ffff66", "foreground": "#111111", "leading_diamond": "<background,parentBackground>\ue0b2</>", "style": "diamond", "template": " \uf0ad ", "type": "root" }, { "background": "#c4a000", "foreground": "#000000", "leading_diamond": "<background,parentBackground>\ue0b2</>", "properties": { "always_enabled": false, "threshold": 100 }, "style": "diamond", "template": " {{ .FormattedMs }} \uf252 ", "type": "executiontime" }, { "background": "#d3d7cf", "foreground": "#000000", "leading_diamond": "<background,parentBackground>\ue0b2</>", "style": "diamond", "template": " {{ .CurrentDate | date .Format }} \uf017 ", "type": "time" } ], "type": "prompt" }, { "alignment": "left", "newline": true, "segments": [ { "foreground": "#007ACC", "style": "plain", "template": "\u276f", "type": "text" } ], "type": "prompt" } ], "console_title_template": "{{ .Shell }} in {{ .Folder }}", "final_space": true, "transient_prompt": { "background": "transparent", "foreground": "#007ACC", "template": "\u276f " }, "version": 2 }
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output