Closed andi-blafasl closed 1 year ago
@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.
@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.
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?
@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.
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:
No sure what you mean by disabling tooltips. Did not find anything in the clink documentation.
@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).
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?
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: 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
What OS are you seeing the problem on?
Windows
Which shell are you using?
other (please specify)
Log output