PowerShell / PowerShellGallery

236 stars 65 forks source link

Find-Module is taking 50x longer than expected #257

Open 96malhar opened 1 year ago

96malhar commented 1 year ago

Prerequisites

Steps to reproduce

Example Command - Measure-Command { Find-Module AWSPowerShell } | Select-Object -ExpandProperty totalseconds

Timeframes on 8/3/2023 -1:20 PM - 3:40 PM PST +

Expected behavior

The `Find-Module` command should complete within 2 seconds.

Actual behavior

The `Find-Module` command takes upto 80 seconds to complete.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.4
PSEdition                      Core
GitCommitId                    7.3.4
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0


### Version

PowerShell 7.3.4

### Visuals

_No response_
o-l-a-v commented 8 months ago

Use Microsoft.PowerShell.PSResourceGet cmdlet Find-PSResource instead, it's more performant.

boblodgett commented 6 months ago

This issue from last year can be closed. Thank you for the information on using Find-PSResource as we have switched over to using that now and it has improved performance.