8000 Specifying a Set-Alias in your PowerShell profile causes startup time to significantly increase · Issue #10816 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Specifying a Set-Alias in your PowerShell profile causes startup time to significantly increase #10816
@antiufo

Description

@antiufo

Steps to reproduce

Add the following line to an otherwise empty $profile file, and launch pwsh:

Set-Alias example dir

Expected behavior

PowerShell still loads reasonably fast.

Actual behavior

PowerShell loads considerably more slowly:

Loading personal and system profiles took 2026ms.

Get-Module shows that Microsoft.PowerShell.Utility is loaded when Set-Alias is used.

Given that aliases are one of the basic features you can expect users might want to customize in their profile, it seems unfortunate that doing so introduces such a significant slowdown.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0-preview.4
PSEdition                      Core
GitCommitId                    7.0.0-preview.4
OS                             Linux 4.19.37-5+deb10u2rodete2-amd64 #1 SMP Debian 4.19.37-5+deb10u2rodete2 (2019-08-28 > 2018)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or moreWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0