Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input after space delayed in cmder / clink / cmd #2815

Closed
1 task done
andi-blafasl opened this issue Sep 22, 2022 · 7 comments
Closed
1 task done

input after space delayed in cmder / clink / cmd #2815

andi-blafasl opened this issue Sep 22, 2022 · 7 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@andi-blafasl
Copy link

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

I try to use oh-my-posh with cmder. Did a fresh install of cmder Version 1.3.19.1181 (manual zip) and latest oh-my-posh (via winget) and integrated oh-my-posh via the oh-my-posh.lua script.
With this configuration, the shell is unusable slow while typing commands. After every space there is a huge delay.
The following example is copy-paste input:
oh-my-posh-slow
yes, it is that slow in real time! ;-)
The issue only exists in cmd, no problem in bash (git-bash) or powershell
Just hitting enter is also very slow and I see ~150ms execution time in debug output.
Already added an exclusion to out Sophos Anti Virus. Also completely disabling the Anti Virus does not change this time
Using a custom Theme based on atomic. I removed the segments that I don't need and adjusted a view colors and the path layout. But the effect also happens with other Themes like the default one.

Theme

customized atomic

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "background": "#0077c2",
          "foreground": "#ffffff",
          "leading_diamond": "\u256d\u2500\ue0b6",
          "style": "diamond",
          "template": "\uf120 {{ .Name }} ",
          "type": "shell"
        },
        {
          "background": "#ef5350",
          "foreground": "#FFFB38",
          "style": "diamond",
          "template": "<parentBackground>\ue0b0</> \uf292 ",
          "type": "root"
        },
        {
          "background": "#6CA35E",
          "foreground": "#2d3436",
          "powerline_symbol": "\ue0b0",
          "properties": {
            "folder_icon": "\uf07b",
            "style": "full"
          },
          "style": "powerline",
          "template": " \uf07b {{ .Path }} ",
          "type": "path"
        },
        {
          "background": "#FFFB38",
          "background_templates": [
            "{{ if or (.Working.Changed) (.Staging.Changed) }}#ffeb95{{ end }}",
            "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#c5e478{{ end }}",
            "{{ if gt .Ahead 0 }}#C792EA{{ end }}",
            "{{ if gt .Behind 0 }}#C792EA{{ end }}"
          ],
          "foreground": "#011627",
          "powerline_symbol": "\ue0b0",
          "properties": {
            "branch_icon": "\ue725 ",
            "fetch_status": true,
            "fetch_upstream_icon": true
          },
          "style": "powerline",
          "template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }}<#ef5350> \uf046 {{ .Staging.String }}</>{{ end }} ",
          "type": "git"
        }
      ],
      "type": "prompt"
    },
    {
      "alignment": "right",
      "segments": [
        {
          "background": "#316ce4",
          "foreground": "#ffffff",
          "leading_diamond": "\ue0b6",
          "properties": {
            "parse_kubeconfig": true
          },
          "style": "diamond",
          "template": "\ufd31 {{.Context}}{{if .Namespace}} :: {{.Namespace}}{{end}}",
          "trailing_diamond": "\ue0b4",
          "type": "kubectl"
        },
        {
          "background": "#b2bec3",
          "foreground": "#222222",
          "leading_diamond": "\ue0b6",
          "properties": {
            "linux": "\ue712",
            "macos": "\ue711",
            "windows": "\ue70f"
          },
          "style": "diamond",
          "template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}<#262626> \ue0b2</>",
          "type": "os"
        },
        {
          "background": "#f36943",
          "background_templates": [
            "{{if eq \"Charging\" .State.String}}#b8e994{{end}}",
            "{{if eq \"Discharging\" .State.String}}#fff34e{{end}}",
            "{{if eq \"Full\" .State.String}}#33DD2D{{end}}"
          ],
          "foreground": "#262626",
          "invert_powerline": true,
          "leading_diamond": "\ue0b2",
          "properties": {
            "charged_icon": "\uf58e ",
            "charging_icon": "\uf1e6 ",
            "discharging_icon": "\ue234 "
          },
          "style": "diamond",
          "template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 <#262626>\ue0b2</>",
          "type": "battery"
        },
        {
          "background": "#40c4ff",
          "foreground": "#262626",
          "invert_powerline": true,
          "leading_diamond": "\ue0b2",
          "properties": {
            "time_format": "_2,15:04"
          },
          "style": "diamond",
          "template": " \uf5ef {{ .CurrentDate | date .Format }} ",
          "trailing_diamond": "\ue0b4",
          "type": "time"
        }
      ],
      "type": "prompt"
    },
    {
      "alignment": "left",
      "newline": true,
      "segments": [
        {
          "foreground": "#21c7c7",
          "style": "plain",
          "template": "\u2570\u2500",
          "type": "text"
        },
        {
          "foreground": "#e0f8ff",
          "foreground_templates": [
            "{{ if gt .Code 0 }}#ef5350{{ end }}"
          ],
          "properties": {
            "always_enabled": true
          },
          "style": "plain",
          "template": "\ue285\ufb00 ",
          "type": "exit"
        }
      ],
      "type": "prompt"
    }
  ],
  "version": 2
}

What OS are you seeing the problem on?

Windows

Which shell are you using?

other (please specify)

Log output

�[1mVersion:�[0m 9.5.0

�[1mSegments:�[0m

ConsoleTitle(false) -   0 ms - 
shell(true)    -   0 ms - �[38;2;0;119;194m╭─�[0m�[48;2;0;119;194m�[38;2;255;255;255m WindowsTerminal �[0m
root(false)    -   0 ms - 
path(true)     -   0 ms - �[48;2;108;163;94m�[38;2;0;119;194m�[0m�[48;2;108;163;94m�[38;2;45;52;54m  ~ �[0m
git(false)     -  17 ms - 
kubectl(true)  -   1 ms - �[38;2;49;108;228m�[0m�[48;2;49;108;228m�[38;2;255;255;255mﴱ tkg-cluster-1�[0m�[38;2;49;108;228m�[0m
os(true)       -   0 ms - �[38;2;178;190;195m�[0m�[48;2;178;190;195m�[38;2;34;34;34m �[0m�[48;2;178;190;195m�[38;2;38;38;38m �[0m
battery(true)  -  10 ms - �[38;2;51;221;45m�[0m�[48;2;51;221;45m�[38;2;38;38;38m  89 �[0m�[48;2;51;221;45m�[38;2;38;38;38m�[0m
time(true)     -   0 ms - �[38;2;64;196;255m�[0m�[48;2;64;196;255m�[38;2;38;38;38m  22,16:31 �[0m�[38;2;64;196;255m�[0m
text(true)     -   0 ms - �[38;2;33;199;199m╰─�[0m
exit(true)     -   0 ms - �[38;2;224;248;255mff �[0m

�[1mRun duration:�[0m 158.5447ms

�[1mCache path:�[0m C:\Users\test\AppData\Local\oh-my-posh

�[1mConfig path:�[0m C:\Users\test\.mytheme.omp.json

�[1mLogs:�[0m

2022/09/22 16:31:04 debug: Getenv
C:\Users\test\AppData\Local
2022/09/22 16:31:04 Getenv duration: 0s, args: LOCALAPPDATA
2022/09/22 16:31:04 CachePath duration: 562.9µs, args: 
2022/09/22 16:31:04 debug: Getenv
C:\Users\test\.mytheme.omp.json
2022/09/22 16:31:04 Getenv duration: 0s, args: POSH_THEME
2022/09/22 16:31:04 debug: Shell
process name: cmd.exe
2022/09/22 16:31:04 debug: Shell
parent process name: WindowsTerminal.exe
2022/09/22 16:31:04 Shell duration: 61.0619ms, args: 
2022/09/22 16:31:04 resolveConfigPath duration: 61.0619ms, args: 
2022/09/22 16:31:04 Init duration: 127.2656ms, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 config.loadConfig duration: 1.1713ms, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 debug: Getenv

2022/09/22 16:31:04 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/09/22 16:31:04 WindowsRegistryKeyValue duration: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 debug: WindowsRegistryKeyValue
ColorizationColor(DWORD): 0xC40078D7
2022/09/22 16:31:04 Root duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 ErrorCode duration: 0s, args: 
2022/09/22 16:31:04 IsWsl duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 debug: User
test
2022/09/22 16:31:04 User duration: 0s, args: 
2022/09/22 16:31:04 debug: Host
ID1616
2022/09/22 16:31:04 Host duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 Root duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 PathSeparator duration: 0s, args: 
2022/09/22 16:31:04 PathSeparator duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 IsWsl duration: 0s, args: 
2022/09/22 16:31:04 StackCount duration: 0s, args: 
2022/09/22 16:31:04 DirIsWritable duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 debug: CommandPath
C:\Program Files\Git\cmd\git.exe
2022/09/22 16:31:04 CommandPath duration: 15.6602ms, args: git.exe
2022/09/22 16:31:04 HasCommand duration: 15.6602ms, args: git.exe
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 error: HasParentFilePath
CreateFile C:\.git: Das System kann die angegebene Datei nicht finden.
2022/09/22 16:31:04 HasParentFilePath duration: 1.7069ms, args: .git
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 debug: Getenv

2022/09/22 16:31:04 Getenv duration: 0s, args: KUBECONFIG
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 debug: FileContent
apiVersion: v1
clusters:
- cluster:
    server: https://10.10.10.10:6443
  name: 10.10.10.10
- cluster:
    certificate-authority-data: *removed*
    server: https://10.10.10.10:6443
  name: 10.10.10.10
- cluster:
    server: https://tanzu.vsphere.local:6443
  name: supervisor-tanzu.vsphere.local
- cluster:
    server: https://tanzu.vsphere.local:6443
  name: tanzu.vsphere.local
contexts:
- context:
    cluster: tanzu.vsphere.local
    user: wcp:tanzu.vsphere.local:test@vsphere.local
  name: tanzu.vsphere.local
- context:
    cluster: 10.10.10.10
    namespace: test01
    user: wcp:10.10.10.10:test@vsphere.local
  name: test01
- context:
    cluster: 10.10.10.10
    namespace: test02
    user: wcp:10.10.10.10:test@vsphere.local
  name: test02
- context:
    cluster: 10.10.10.10
    user: wcp:10.10.10.10:test@vsphere.local
  name: tkg-cluster-1
current-context: tkg-cluster-1
kind: Config
preferences: {}
users:
- name: wcp:10.10.10.10:test@vsphere.local
  user:
    token: *removed*
- name: wcp:10.10.10.10:test@vsphere.local
  user:
    token: *removed*
- name: wcp:tanzu.vsphere.local:test@vsphere.local
  user:
    token: *removed*

2022/09/22 16:31:04 FileContent duration: 0s, args: C:\Users\test\.kube\config
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 IsWsl duration: 0s, args: 
2022/09/22 16:31:04 BatteryState duration: 9.1151ms, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 Flags duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 debug: Pwd
C:\Users\test
2022/09/22 16:31:04 Pwd duration: 0s, args: 
2022/09/22 16:31:04 debug: Home
C:\Users\test
2022/09/22 16:31:04 GOOS duration: 0s, args: 
2022/09/22 16:31:04 ErrorCode duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 Shell duration: 0s, args: 
2022/09/22 16:31:04 TemplateCache duration: 0s, args: 
2022/09/22 16:31:04 debug: Getenv
C:\Users\test\AppData\Local
2022/09/22 16:31:04 Getenv duration: 0s, args: LOCALAPPDATA
2022/09/22 16:31:04 CachePath duration: 0s, args: 
2022/09/22 16:31:04 Flags duration: 0s, args:
@andi-blafasl andi-blafasl added the 🐛 bug Something isn't working label Sep 22, 2022
@JanDeDobbeleer
Copy link
Owner

@andi-blafasl this is the problem right here:

Init duration: 127.2656ms, args: 

But that can't be shell specific (as to my knowledge). I'll check what could be the cause.

@JanDeDobbeleer
Copy link
Owner

@andi-blafasl the 150ms is actually not explainable unless the init script did not provide the shell name. I made sure to add it everywhere, the slowness in typing however can only be explained by tooltips being present. We might need to disable that when you're not actively using them. They're being rendered async, but maybe the version of clink is out of date on your end which causes that to render synchronous. So also please validate that.

JanDeDobbeleer added a commit that referenced this issue Sep 23, 2022
@andi-blafasl
Copy link
Author

Hi Jan,
thank you for the quick reply. I'm using the latest version of cmder with embedded clink

clink --version
1.2.46.69fc92

yes, i saw, that is a bit outdated.

but the init duration is nearly the same on all shells:

╭─ cmd   ~                                                           ﴱ tkg-cluster-1    89   23,11:21 
╰─ff oh-my-posh debug | head -n 40

Version: 9.5.0

Segments:

ConsoleTitle(false) -   0 ms -
shell(true)    -   0 ms - ╭─ WindowsTerminal
root(false)    -   0 ms -
path(true)     -   0 ms -   ~
git(false)     -  17 ms -
kubectl(true)  -   1 ms - ﴱ tkg-cluster-1
os(true)       -   0 ms -   
battery(true)  -  10 ms -   89 
time(true)     -   0 ms -   23,11:32 
text(true)     -   0 ms - ╰─
exit(true)     -   0 ms - ff

Run duration: 147.5267ms

Cache path: C:\Users\test\AppData\Local\oh-my-posh

Config path: C:\Users\test\.mytheme.omp.json

Logs:

2022/09/23 11:32:03 debug: Getenv
C:\Users\test\AppData\Local
2022/09/23 11:32:03 Getenv duration: 0s, args: LOCALAPPDATA
2022/09/23 11:32:03 CachePath duration: 0s, args:
2022/09/23 11:32:03 debug: Getenv
C:\Users\test\.mytheme.omp.json
2022/09/23 11:32:03 Getenv duration: 0s, args: POSH_THEME
2022/09/23 11:32:03 debug: Shell
process name: cmd.exe
2022/09/23 11:32:03 debug: Shell
parent process name: WindowsTerminal.exe
2022/09/23 11:32:03 Shell duration: 63.1079ms, args:
2022/09/23 11:32:03 resolveConfigPath duration: 63.1079ms, args:
2022/09/23 11:32:03 Init duration: 115.5407ms, args:
2022/09/23 11:32:03 Flags duration: 0s, args:
╭─ bash   ~                                                          ﴱ tkg-cluster-1    89   23,11:33 
╰─ff oh-my-posh debug | head -n 40

Version: 9.5.0

Segments:

ConsoleTitle(false) -   0 ms -
shell(true)    -   0 ms - ╭─ bash
root(false)    -   0 ms -
path(true)     -   0 ms -   ~
git(false)     -   2 ms -
kubectl(true)  -   1 ms - ﴱ tkg-cluster-1
os(true)       -   0 ms -   
battery(true)  -  11 ms -   89 
time(true)     -   0 ms -   23,11:33 
text(true)     -   0 ms - ╰─
exit(true)     -   0 ms - ff

Run duration: 116.4311ms

Cache path: C:\Users\test\AppData\Local\oh-my-posh

Config path: C:/Users/test/.mytheme.omp.json

Logs:

2022/09/23 11:33:59 debug: Getenv
C:\Users\test\AppData\Local
2022/09/23 11:33:59 Getenv duration: 0s, args: LOCALAPPDATA
2022/09/23 11:33:59 CachePath duration: 0s, args:
2022/09/23 11:33:59 debug: Getenv
C:/Users/test/.mytheme.omp.json
2022/09/23 11:33:59 Getenv duration: 0s, args: POSH_THEME
2022/09/23 11:33:59 debug: Shell
process name: bash.exe
2022/09/23 11:33:59 Shell duration: 43.097ms, args:
2022/09/23 11:33:59 resolveConfigPath duration: 43.097ms, args:
2022/09/23 11:33:59 Init duration: 97.1822ms, args:
2022/09/23 11:33:59 Flags duration: 0s, args:
2022/09/23 11:33:59 config.loadConfig duration: 1.0485ms, args:
2022/09/23 11:33:59 Flags duration: 0s, args:
╰─ff oh-my-posh debug

Version: 9.5.0

Segments:

ConsoleTitle(false) -   0 ms -
shell(true)    -   0 ms - ╭─ powershell
root(false)    -   0 ms -
path(true)     -   0 ms -   ~
git(false)     -  17 ms -
kubectl(true)  -   1 ms - ﴱ tkg-cluster-1
os(true)       -   0 ms -   
battery(true)  -   9 ms -   89 
time(true)     -   0 ms -   23,11:35 
text(true)     -   0 ms - ╰─
exit(true)     -   0 ms - ff

Run duration: 128.6534ms

Cache path: C:\Users\hoesl\AppData\Local\oh-my-posh

Config path: C:\Users\hoesl\.mytheme.omp.json

Logs:

2022/09/23 11:35:32 debug: Getenv
C:\Users\hoesl\AppData\Local
2022/09/23 11:35:32 Getenv duration: 0s, args: LOCALAPPDATA
2022/09/23 11:35:32 CachePath duration: 0s, args:
2022/09/23 11:35:32 debug: Getenv
C:\Users\hoesl\.mytheme.omp.json
2022/09/23 11:35:32 Getenv duration: 0s, args: POSH_THEME
2022/09/23 11:35:32 debug: Shell
process name: powershell.exe
2022/09/23 11:35:32 Shell duration: 43.06ms, args:
2022/09/23 11:35:32 resolveConfigPath duration: 43.06ms, args:
2022/09/23 11:35:32 Init duration: 95.9025ms, args:
2022/09/23 11:35:32 Flags duration: 0s, args:
2022/09/23 11:35:32 config.loadConfig duration: 1.2447ms, args:
2022/09/23 11:35:32 Flags duration: 0s, args:

any idea how to get detailed information why the init duration is so high?

@JanDeDobbeleer
Copy link
Owner

@andi-blafasl not immediately, it should not even resolve the shell name tbh. Not sure why it does that here. I'll validate myself on Windows as well.

@andi-blafasl
Copy link
Author

just updated the clink binaries in cmder to the latest version

clink --version
1.3.42.ef446e

and it is a little bit faster now:
oh-my-posh-faster

No sure what you mean by disabling tooltips. Did not find anything in the clink documentation.

@JanDeDobbeleer
Copy link
Owner

@andi-blafasl that's something I did, if you install 10.0.1, in theory this should no longer be an issue (install + restart the terminal).

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants