Terminal-Icons icon indicating copy to clipboard operation
Terminal-Icons copied to clipboard

Superslow module load after updating PowerShell to 7.5

Open getangar opened this issue 11 months ago • 5 comments

Afte having upgraded to PowerShell 7.5, this module takes over 4.5 seconds to start:

Days : 0 Hours : 0 Minutes : 0 Seconds : 4 Milliseconds : 435 Ticks : 44350355 TotalDays : 5.13314293981481E-05 TotalHours : 0.00123195430555556 TotalMinutes : 0.0739172583333333 TotalSeconds : 4.4350355 TotalMilliseconds : 4435.0355

Please let me know how can I provide you further details in case you need it.

getangar avatar Feb 16 '25 20:02 getangar

I'm experiencing the same issue. I have only installed the oh-my-posh and terminal-icons, and the profile loads in about 9 seconds. If I disable the terminal-icons, my terminal opens instantly.

iHaired avatar Feb 24 '25 13:02 iHaired

I was pulling my hair out over the same issue! As temporary workaround, I commented out the Import-Module -Name Terminal-Icons and put this at the very top of my Microsoft.PowerShell_profile.ps1

Register-EngineEvent -SourceIdentifier 'PowerShell.OnIdle' -MaxTriggerCount 1 -Action {
    Import-Module -Name Terminal-Icons -Global
} | Out-Null

gpshonik avatar Feb 24 '25 16:02 gpshonik

I was pulling my hair out over the same issue! As temporary workaround, I commented out the Import-Module -Name Terminal-Icons and put this at the very top of my Microsoft.PowerShell_profile.ps1

Register-EngineEvent -SourceIdentifier 'PowerShell.OnIdle' -MaxTriggerCount 1 -Action { Import-Module -Name Terminal-Icons -Global } | Out-Null

I did the same at the beginning, but at the moment, I ended up to call the module on demand.

getangar avatar Feb 24 '25 16:02 getangar

I was pulling my hair out over the same issue! As temporary workaround, I commented out the Import-Module -Name Terminal-Icons and put this at the very top of my Microsoft.PowerShell_profile.ps1

Register-EngineEvent -SourceIdentifier 'PowerShell.OnIdle' -MaxTriggerCount 1 -Action { Import-Module -Name Terminal-Icons -Global } | Out-Null

This temporary solution works as of now. Thanks!

foxtbirdy avatar Jun 05 '25 13:06 foxtbirdy

¡Me estaba tirando de los pelos por el mismo problema! Como solución temporal, comenté el Import-Module -Name Terminal-Icons y puse esto en la parte superior de mi Microsoft.PowerShell_profile.ps1

Register-EngineEvent -SourceIdentifier 'PowerShell.OnIdle' -MaxTriggerCount 1 -Action { Import-Module -Name Terminal-Icons -Global } | Out-Null

I went from 900ms to 256ms, thanks for providing a solution.

franciscorojas27 avatar Jul 23 '25 17:07 franciscorojas27