oh-my-posh: Version 3 slower than Version 2
Prerequisites
- I have read and understand the
CONTRIBUTINGguide - I looked for duplicate issues before submitting this one
Description
Version 3 is slower than version 2
Environment
- Oh my Posh version: 3.132.0
- Theme: slim
- Operating System: Windows 10
- Shell: pwsh 7.1.3
- Terminal: Windows Terminal 1.6.10571.0
Steps to Reproduce
- Install oh-my-posh through scoop
- Disable Antivirus
- Open Windows Terminal
- execute
pwsh -noprofileto be sure no other module interfer - execute
Invoke-Expression (oh-my-posh --init --shell pwsh --config "$(scoop prefix oh-my-posh3)/themes/slim.omp.json")
Expected behavior: Same execution time of version 2
Actual behavior: Slower that version 2
Notes
- I disabled antivirus (Kaspersky)
- I launched pwsh with -noprofile flag
- I attached two small video
- I have also tried to install oh-my-posh 3 through
Install-Modulewith no luck
I used Measure-Command to oh-my-posh command, below the result
massimo@JUPITER ❯ Measure-Command { oh-my-posh }
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 133
Ticks : 1331365
TotalDays : 1,54093171296296E-06
TotalHours : 3,69823611111111E-05
TotalMinutes : 0,00221894166666667
TotalSeconds : 0,1331365
TotalMilliseconds : 133,1365
Version 2
https://user-images.githubusercontent.com/4323707/113514502-541c9580-956f-11eb-83db-b6fda5c955ee.mp4
Version 3
https://user-images.githubusercontent.com/4323707/113514530-71e9fa80-956f-11eb-8428-22b1bcc4be37.mp4
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (10 by maintainers)
@TravisTX Do you think merging the PR anyway? I think is a good option.
You’re right I found the issue on
omp.ps1I have theAzmodule and two Azure Subscriptions, every time the init tries to set the$envvariables, I added the if before and now run smoothly.I don’t know where you use the Az $env variables, the below code fixes the problem and rise another: if I change the Azure Subscription? (I have two…)