JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.38k stars 2.38k forks source link

20+ second boot time #4820

Closed ctolkien closed 7 months ago

ctolkien commented 7 months ago

Code of Conduct

What happened?

In a fairly recent version of OhMyPosh, performance to boot has drastically changed. I have tried to strip back anything that might be impacting performance, dropped back to the default theme, etc.

00:20.3391124 oh-my-posh init pwsh | Invoke-Expression

The above line is taking >20 seconds to complete.

I'll try and get some more details together in the interim, as I'm pretty light on details at the moment. If there is any debug steps that would help track this down, I'm all ears.

Theme

Default, am not specifying a theme

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

 source  oh-my-posh debug --plain

Version: 19.20.0

Shell: pwsh (7.4.1)

Prompt:

 ChadTolkien   source                                                                        in pwsh at 11:23:16

Segments:

ConsoleTitle(true)                        -   2 ms
Session(true)                             -   0 ms
Path(true)                                -   1 ms
Git(false)                                -  14 ms
Root(false)                               -   0 ms
Status(true)                              -   0 ms
Node(false)                               -   1 ms
Go(false)                                 -   1 ms
Python(false)                             -   1 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 30.0224ms

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

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 11:23:16.439 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.439 shell.go:Getenv(TERM_PROGRAM) - 523.3µs
[DEBUG] 11:23:16.439 shell.go:Getenv:325 → C:\Users\ChadTolkien\AppData\Local
[TRACE] 11:23:16.439 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 11:23:16.440 shell_windows.go:CachePath() - 523.3µs
[DEBUG] 11:23:16.440 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.440 shell.go:Getenv(POSH_THEME) - 0s
[DEBUG] 11:23:16.440 shell.go:resolveConfigPath:245 → No config set, fallback to default config
[TRACE] 11:23:16.440 shell.go:resolveConfigPath() - 0s
[TRACE] 11:23:16.440 shell.go:Init() - 1.5691ms
[TRACE] 11:23:16.440 shell.go:Flags() - 0s
[DEBUG] 11:23:16.440 config.go:loadConfig:126 → no config file specified, using default
[TRACE] 11:23:16.440 config.go:loadConfig() - 0s
[TRACE] 11:23:16.440 shell.go:Flags() - 0s
[DEBUG] 11:23:16.440 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.440 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 11:23:16.440 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[TRACE] 11:23:16.440 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.440 shell_windows.go:WindowsRegistryKeyValue:217 → ColorizationColor(DWORD): 0xC40078D4
[DEBUG] 11:23:16.440 shell.go:Shell:593 → no shell name provided in flags, trying to detect it
[DEBUG] 11:23:16.449 shell.go:Shell:601 → process name: pwsh.exe
[TRACE] 11:23:16.449 shell.go:Shell() - 8.5776ms
[DEBUG] 11:23:16.449 shell.go:Getenv:325 → 7.4.1
[TRACE] 11:23:16.449 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 11:23:16.449 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 11:23:16.449 text.go:Render:70 → Rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 11:23:16.449 shell_windows.go:Root() - 0s
[TRACE] 11:23:16.449 shell.go:Shell() - 0s
[TRACE] 11:23:16.449 shell.go:StatusCodes() - 0s
[TRACE] 11:23:16.449 shell_windows.go:IsWsl() - 0s
[DEBUG] 11:23:16.449 shell.go:TemplateCache:774 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\ChadTolkien\AppData\Roaming CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-I9 ComSpec=C:\WINDOWS\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData GOPATH=C:\Users\ChadTolkien\go HOMEDRIVE=C: HOMEPATH=\Users\ChadTolkien JAVA_HOME=C:\Program Files\Microsoft\jdk-11.0.22.7-hotspot\ LOCALAPPDATA=C:\Users\ChadTolkien\AppData\Local LOGONSERVER=\\DESKTOP-I9 npm_config_cache=D:\packages\npm NUGET_PACKAGES=D:\packages\nuget NUMBER_OF_PROCESSORS=16 OneDrive=C:\Users\ChadTolkien\OneDrive - Soda Digital OneDriveCommercial=C:\Users\ChadTolkien\OneDrive - Soda Digital OneDriveConsumer=C:\Users\ChadTolkien\OneDrive OS=Windows_NT Path=C:\Program Files\PowerShell\7;C:\Program Files\Microsoft\jdk-11.0.22.7-hotspot\bin;C:\Program Files\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Volta\;C:\Program Files (x86)\Microsoft SDKs\Azdata\CLI\wbin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\cloudflared\.;C:\Program Files\Microsoft\Web Platform Installer\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Tailscale IPN\;C:\Program Files (x86)\cloudflared\;C:\Program Files\PowerShell\7\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files\Microsoft\Azure Functions Core Tools\;C:\Program Files\Amazon\AWSCLIV2\;C:\Program Files\GitHub CLI\;C:\Program Files\Go\bin;C:\Users\ChadTolkien\AppData\Local\Volta\bin;C:\Users\ChadTolkien\AppData\Local\pnpm;C:\Users\ChadTolkien\.cargo\bin;C:\Users\ChadTolkien\AppData\Local\Microsoft\WindowsApps;C:\Users\ChadTolkien\AppData\Local\Programs\Azure Data Studio\bin;C:\Users\ChadTolkien\AppData\Local\Programs\oh-my-posh\bin;C:\Users\ChadTolkien\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;C:\Users\ChadTolkien\AppData\Local\Programs\Fiddler;C:\Users\ChadTolkien\.dotnet\tools;C:\Users\ChadTolkien\AppData\Local\Programs\Azure Dev CLI;C:\Users\ChadTolkien\AppData\Local\Programs\Bicep CLI;C:\Users\ChadTolkien\OneDrive - Soda Digital\Tools;C:\Users\ChadTolkien\AppData\Local\Microsoft\WindowsApps;C:\Users\ChadTolkien\AppData\Local\Android\Sdk\platform-tools;C:\Users\ChadTolkien\.dotnet\tools;C:\Users\ChadTolkien\AppData\Local\GitH;C:\Users\ChadTolkien\.dotnet\tools;C:\Users\ChadTolkien\AppData\Local\Microsoft\WinGet\Packages\Microsoft.A;C:\Users\ChadTolkien\AppData\Loca;C:\Users\ChadTolkien\AppData\Local\Microsoft;C:\Users\ChadTolkien;C:\Users\ChadTolkien\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\ChadTolkien\AppData\Local\Programs\Azure Dev CLI\;C:\Users\ChadTolkien\AppData\Local\GitHubDesktop\bin;C:\Users\ChadTolkien\go\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL PNPM_HOME=C:\Users\ChadTolkien\AppData\Local\pnpm POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=29 POSH_GIT_ENABLED=False POSH_INSTALLER=winget POSH_PID=21124 POSH_SHELL_VERSION=7.4.1 POSH_THEMES_PATH=C:\Users\ChadTolkien\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Enterprise PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 158 Stepping 12, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9e0c ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\ChadTolkien\OneDrive - Soda Digital\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules; PUBLIC=C:\Users\Public SESSIONNAME=Console SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\Users\CHADTO~1\AppData\Local\Temp TMP=C:\Users\CHADTO~1\AppData\Local\Temp USERDOMAIN=AzureAD USERDOMAIN_ROAMINGPROFILE=AzureAD USERNAME=ChadTolkien USERPROFILE=C:\Users\ChadTolkien windir=C:\WINDOWS WSLENV=WT_SESSION:WT_PROFILE_ID: WT_PROFILE_ID={574e775e-4f2a-5b96-ac1e-a2962a402336} WT_SESSION=977e736b-fec5-42bd-a791-c678e56b4b7a]
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.449 shell.go:Pwd:355 → C:\Users\ChadTolkien\source
[TRACE] 11:23:16.449 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.449 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[TRACE] 11:23:16.449 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.449 shell.go:User:493 → ChadTolkien
[TRACE] 11:23:16.449 shell.go:User() - 0s
[DEBUG] 11:23:16.450 shell.go:Host:505 → DESKTOP-i9
[TRACE] 11:23:16.450 shell.go:Host() - 0s
[TRACE] 11:23:16.450 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.450 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.450 shell.go:Getenv(SHLVL) - 0s
[TRACE] 11:23:16.451 shell.go:TemplateCache() - 1.6609ms
[DEBUG] 11:23:16.451 shell.go:Getenv:325 → 29
[TRACE] 11:23:16.451 shell.go:Getenv(POSH_CURSOR_LINE) - 0s
[DEBUG] 11:23:16.451 shell.go:Getenv:325 → 1
[TRACE] 11:23:16.451 shell.go:Getenv(POSH_CURSOR_COLUMN) - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Shell() - 0s
[TRACE] 11:23:16.451 shell.go:Shell() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.451 properties.go:GetString:28 → {{ .Code }}
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.451 segment.go:SetEnabled:529 → Segment: Path
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 segment.go:SetEnabled:529 → Segment: Status
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[TRACE] 11:23:16.451 shell.go:StatusCodes() - 0s
[DEBUG] 11:23:16.451 segment.go:SetEnabled:529 → Segment: Git
[DEBUG] 11:23:16.451 text.go:Render:70 → Rendering template: {{ .Code }}
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.451 shell.go:Pwd() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.451 segment.go:SetEnabled:529 → Segment: Root
[TRACE] 11:23:16.451 shell.go:Shell() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:Flags() - 0s
[DEBUG] 11:23:16.451 segment.go:SetEnabled:529 → Segment: Session
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.451 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 11:23:16.451 shell.go:Getenv:325 → NO DATA
[TRACE] 11:23:16.451 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 11:23:16.451 shell_windows.go:Root() - 0s
[TRACE] 11:23:16.451 shell.go:TemplateCache() - 0s
[DEBUG] 11:23:16.451 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 11:23:16.451 properties.go:GetString:28 → 
[DEBUG] 11:23:16.451 properties.go:GetString:28 → 
[DEBUG] 11:23:16.451 shell.go:Getenv:325 → C:\Users\ChadTolkien\AppData\Local
[TRACE] 11:23:16.451 shell.go:Getenv(LOCALAPPDATA) - 0s
[DEBUG] 11:23:16.451 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 properties.go:GetString:28 → ~
[DEBUG] 11:23:16.451 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 11:23:16.451 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[TRACE] 11:23:16.451 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.451 properties.go:GetBool:22 → always_enabled: true
[TRACE] 11:23:16.451 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.451 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[DEBUG] 11:23:16.452 properties.go:GetString:28 → NO DATA
[DEBUG] 11:23:16.452 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[DEBUG] 11:23:16.452 properties.go:GetString:28 → folder
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:GOOS() - 0s
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[DEBUG] 11:23:16.452 properties.go:GetString:28 → NO DATA
[TRACE] 11:23:16.452 shell.go:PathSeparator() - 0s
[DEBUG] 11:23:16.452 properties.go:GetString:28 → \
[TRACE] 11:23:16.452 shell.go:Pwd() - 0s
[TRACE] 11:23:16.452 shell_windows.go:IsWsl() - 0s
[TRACE] 11:23:16.452 shell.go:StackCount() - 0s
[DEBUG] 11:23:16.453 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 11:23:16.453 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 11:23:16.453 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 11:23:16.453 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 11:23:16.453 shell_windows.go:DirIsWritable() - 786.2µs
[TRACE] 11:23:16.453 shell.go:TemplateCache() - 0s
[DEBUG] 11:23:16.465 shell.go:CommandPath:545 → C:\Program Files\Git\cmd\git.exe
[TRACE] 11:23:16.465 shell.go:CommandPath(git.exe) - 14.5127ms
[TRACE] 11:23:16.465 shell.go:HasCommand(git.exe) - 14.5127ms
[TRACE] 11:23:16.465 shell.go:Pwd() - 0s
[ERROR] 11:23:16.465 shell.go:HasParentFilePath:689 → CreateFile .git: The system cannot find the file specified.
[TRACE] 11:23:16.465 shell.go:HasParentFilePath(.git) - 0s
[DEBUG] 11:23:16.465 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 11:23:16.465 text.go:Render:70 → Rendering template:  {{ if gt .Code 0 }}{{ else }}{{ end }}
[DEBUG] 11:23:16.465 text.go:Render:70 → Rendering template:   {{ path .Path .Location }}
[DEBUG] 11:23:16.465 text.go:Render:70 → Rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }}
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: diamond
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[DEBUG] 11:23:16.466 text.go:Render:70 → Rendering template: diamond
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.466 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.466 segment.go:SetEnabled:529 → Segment: Time
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[DEBUG] 11:23:16.466 properties.go:GetString:28 → 15:04:05
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 properties.go:GetString:28 → files
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.466 shell.go:GOOS() - 0s
[TRACE] 11:23:16.466 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.466 segment.go:SetEnabled:529 → Segment: Go
[DEBUG] 11:23:16.466 segment.go:SetEnabled:529 → Segment: Python
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win]
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → folders: []
[DEBUG] 11:23:16.466 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[TRACE] 11:23:16.466 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.466 segment.go:SetEnabled:529 → Segment: Shell
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.466 properties.go:GetString:28 → files
[DEBUG] 11:23:16.466 properties.go:GetBool:22 → fetch_virtual_env: false
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[TRACE] 11:23:16.466 shell.go:Shell() - 0s
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[TRACE] 11:23:16.466 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.466 shell.go:Flags() - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[TRACE] 11:23:16.466 shell.go:GOOS() - 0s
[DEBUG] 11:23:16.466 segment.go:SetEnabled:529 → Segment: Node
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[DEBUG] 11:23:16.466 properties.go:GetStringArray:52 → folders: []
[DEBUG] 11:23:16.466 properties.go:GetBool:22 → home_enabled: false
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell_windows.go:58 → C:\Users\ChadTolkien
[DEBUG] 11:23:16.466 properties.go:GetString:28 → files
[DEBUG] 11:23:16.466 properties.go:GetBool:22 → fetch_package_manager: false
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.466 shell.go:HasFilesInDir(*.py) - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.466 shell.go:HasFilesInDir(*.ipynb) - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.466 shell.go:HasFilesInDir(pyproject.toml) - 0s
[TRACE] 11:23:16.466 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.466 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.466 shell.go:HasFilesInDir(venv.bak) - 0s
[DEBUG] 11:23:16.466 shell.go:HasFolder:437 → false
[TRACE] 11:23:16.466 shell.go:HasFolder(.venv) - 0s
[DEBUG] 11:23:16.467 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.467 shell.go:HasFilesInDir(*.go) - 1.004ms
[TRACE] 11:23:16.467 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.467 shell.go:HasFolder:437 → false
[TRACE] 11:23:16.467 shell.go:HasFolder(venv) - 1.004ms
[DEBUG] 11:23:16.467 shell.go:HasFolder:437 → false
[TRACE] 11:23:16.467 shell.go:HasFolder(virtualenv) - 63.1µs
[DEBUG] 11:23:16.468 shell.go:HasFolder:437 → false
[TRACE] 11:23:16.468 shell.go:HasFolder(venv-win) - 103µs
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(go.mod) - 166.1µs
[DEBUG] 11:23:16.468 shell.go:HasFolder:437 → false
[TRACE] 11:23:16.468 shell.go:HasFolder(pyenv-win) - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(*.js) - 1.1701ms
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(*.ts) - 0s
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(package.json) - 0s
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(.nvmrc) - 0s
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(pnpm-workspace.yaml) - 0s
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(.pnpmfile.cjs) - 0s
[TRACE] 11:23:16.468 shell.go:Pwd() - 0s
[DEBUG] 11:23:16.468 shell.go:HasFilesInDir:408 → false
[TRACE] 11:23:16.468 shell.go:HasFilesInDir(.vue) - 0s
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: in <p:blue><b>{{ .Name }}</b></>
[TRACE] 11:23:16.468 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.468 shell.go:Shell() - 0s
[TRACE] 11:23:16.468 shell.go:TemplateCache() - 0s
[TRACE] 11:23:16.468 shell.go:Shell() - 0s
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: plain
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: plain
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: plain
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: plain
[DEBUG] 11:23:16.468 text.go:Render:70 → Rendering template: plain
[TRACE] 11:23:16.468 shell.go:Shell() - 0s
[TRACE] 11:23:16.468 shell.go:Flags() - 0s
[TRACE] 11:23:16.468 shell.go:Shell() - 0s
[TRACE] 11:23:16.468 shell.go:Shell() - 0s
[DEBUG] 11:23:16.468 shell_windows.go:TerminalWidth:111 → terminal width: 120
[TRACE] 11:23:16.468 shell_windows.go:TerminalWidth() - 0s
[DEBUG] 11:23:16.469 shell.go:Getenv:325 → C:\Users\ChadTolkien\AppData\Local
[TRACE] 11:23:16.469 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 11:23:16.469 shell_windows.go:CachePath() - 0s
[TRACE] 11:23:16.469 shell.go:Flags() - 0s
ctolkien commented 7 months ago

Running oh-my-posh init pwsh, before piping the output into pwsh itself takes north of 5+ seconds to return a result.

Edit:

I think this is Windows Defender related.

JanDeDobbeleer commented 7 months ago

@ctolkien this is definitely Windows Defender related. You can see internally, once the executable is started, this only takes 20ms. So the startup is being blocked by Windows Defender (or another tool influencing executables).