Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-consuming command pattern in Get-AliasPattern function #971

Open
peetrike opened this issue Jul 16, 2024 · 0 comments
Open

Time-consuming command pattern in Get-AliasPattern function #971

peetrike opened this issue Jul 16, 2024 · 0 comments

Comments

@peetrike
Copy link

System Details

  • posh-git version/path: 1.1.0 C:\Program Files\WindowsPowerShell\Modules\posh-git\1.1.0
  • PowerShell version: 7.4.3, 5.1
  • Git version: 2.45.0
  • Operating system name and version: Windows 10 22H2

Issue Description

I am experiencing a problem with Get-AliasPattern function, that is running part of it in about 500 times when profile script is running.
The problematic code is the pattern get-alias | where . This could be replaced with get-alias -Definition "$cmd", "$cmd.exe" and it becomes ~5..8 times faster.

The similar pattern is in GitTabExpansion.ps1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant