Closed solo-driven closed 12 months ago
37ms is nothing. That's milliseconds so can't give the impression of being slow. The executable being blocked is more likely.
Okay, but what about the error?
Okay, but what about the error?
[ERROR] 21:39:56.804 shell.go:FileContent:527 → open C:\SOME_DIR\ .git/logs/refs/stash: The system cannot find the file specified. When I run debug in a dir where git is initialized
Maybe should you give more attention to the path shown on error... \ to me seems like windows and / seems like linux.
@thiagoszbarros for path matching that doesn't matter. This works regardless, Windows can handle both and even combinations. So path conversions would be purely esthetic and waste of CPU cycles. All that error implies is that there's no stash found for that repo. Could be informative, but the higher level function logs that as an error as it receives an error. It's perfectly normal, and not something that causes the slowness. There, you would have to look at Defender or a virus scanner blocking oh-my-posh' execution.
Additionally, the 100ms run time is also caused by debug alone as the shell isn't provided. On init, and subsequent calls this is provided. If you want to see the real time oh-my-posh takes, run oh-my-posh debug --shell pwsh
. Those timings are inside the executable, as soon as the OS loaded it into memory and it starts running. All other additions to timings are the OS' influence (or something running on the OS).
Code of Conduct
What happened?
Posh was quite slow, just pressing enter and executing simple commands like ls were takings a noticable time (~200ms). I tried to run debug and apparently it is mostly because of git (37ms in Segment section) and also this error:
[ERROR] 21:06:13.440 shell.go:HasParentFilePath:742 → CreateFile .git: The system cannot find the file specified.
Theme
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/peru.omp.json" | Invoke-Expression
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output