-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
I noticed that PowerShell 7.2, 7.3 and 7.4 is much slower at parsing application/atom+xml from PowerShell Gallery API. I'm talking more than twice as slow.
Here's some code to reproduce:
Measure-Command -Expression {
$Uri = [string] "https://www.powershellgallery.com/api/v2/Packages?`$filter=IsLatestVersion and IsPrerelease eq false and (Id eq '{0}')&semVerLevel=1.0.0`$inlinecount=allpages&`$skip=0&`$top=100"
$Headers = [ordered]@{
'Accept' = [string] 'application/atom+xml;charset=UTF-8'
'Accept-Encoding' = [string] 'gzip, deflate'
}
(
'Az.Accounts;Az.ADDomainServices;Az.Advisor;Az.Aks;Az.Alb;Az.AlertsManagement;Az.AnalysisServices;Az.ApiManagement;Az.App;Az.AppConfiguration;Az.ApplicationInsights;Az.ApplicationMonitor;Az.ArcResourceBridge;Az.Attestation;Az.Automanage;Az.Automation;Az.BareMetal;Az.Batch;Az.Billing;Az.BillingBenefits;Az.Blueprint;Az.BootStrapper;Az.BotService;Az.Cdn;Az.ChangeAnalysis;Az.CloudService;Az.CodeSigning;Az.CognitiveServices;Az.Communication;Az.Compute;Az.Compute.ManagedService;Az.ConfidentialLedger;Az.Confluent;Az.ConnectedKubernetes;Az.ConnectedMachine;Az.ConnectedNetwork;Az.ConnectedVMware;Az.ContainerInstance;Az.ContainerRegistry;Az.CosmosDB;Az.CostManagement;Az.CustomLocation;Az.CustomProviders;Az.Dashboard;Az.DataBox;Az.DataBoxEdge;Az.Databricks;Az.Datadog;Az.DataFactory;Az.DataLakeAnalytics;Az.DataLakeStore;Az.DataMigration;Az.DataProtection;Az.DataShare;Az.DedicatedHsm;Az.DeploymentManager;Az.DesktopVirtualization;Az.DevCenter;Az.DeviceProvisioningServices;Az.DeviceUpdate;Az.DevSpaces;Az.DevTestLabs;Az.DigitalTwins;Az.DiskPool;Az.Dns;Az.DnsResolver;Az.DynatraceObservability;Az.EdgeOrder;Az.Elastic;Az.ElasticSan;Az.EventGrid;Az.EventHub;Az.FirmwareAnalysis;Az.Fleet;Az.FluidRelay;Az.FrontDoor;Az.Functions;Az.GraphServices;Az.GuestConfiguration;Az.HanaOnAzure;Az.HDInsight;Az.HdInsightOnAks;Az.HealthBot;Az.HealthcareApis;Az.HPCCache;Az.ImageBuilder;Az.ImportExport;Az.IotCentral;Az.IotHub;Az.KeyVault;Az.KubernetesConfiguration;Az.Kusto;Az.LabServices;Az.LoadTesting;Az.LogicApp;Az.Logz;Az.MachineLearning;Az.MachineLearningCompute;Az.MachineLearningServices;Az.Maintenance;Az.ManagedNetworkFabric;Az.ManagedServiceIdentity;Az.ManagedServices;Az.ManagementPartner;Az.Maps;Az.MariaDb;Az.Marketplace;Az.MarketplaceOrdering;Az.Media;Az.Migrate;Az.MixedReality;Az.MobileNetwork;Az.Monitor;Az.MonitoringSolutions;Az.MySql;Az.NetAppFiles;Az.Network;Az.NetworkAnalytics;Az.NetworkCloud;Az.NetworkFunction;Az.NewRelic;Az.Nginx;Az.NotificationHubs;Az.OperationalInsights;Az.Orbital;Az.PaloAltoNetworks;Az.Peering;Az.PolicyInsights;Az.Portal;Az.PostgreSql;Az.PowerBIEmbedded;Az.PrivateDns;Az.ProviderHub;Az.Purview;Az.Quantum;Az.Qumulo;Az.Quota;Az.RecoveryServices;Az.RedisCache;Az.RedisEnterpriseCache;Az.Relay;Az.Reservations;Az.ResourceGraph;Az.ResourceMover;Az.Resources;Az.Search;Az.Security;Az.SecurityInsights;Az.SelfHelp;Az.ServiceBus;Az.ServiceFabric;Az.ServiceLinker;Az.SignalR;Az.SpringCloud;Az.Sql;Az.SqlVirtualMachine;Az.Ssh;Az.StackEdge;Az.StackHCI;Az.StackHCI.NetworkHUD;Az.StackHCIVM;Az.Storage;Az.StorageCache;Az.StorageMover;Az.StorageSync;Az.StreamAnalytics;Az.Subscription;Az.Support;Az.Synapse;Az.TimeSeriesInsights;Az.Tools.Installer;Az.Tools.Migration;Az.Tools.Predictor;Az.TrafficManager;Az.VMware;Az.VoiceServices;Az.Websites;Az.WindowsIotServices;Az.Workloads'
).Split(';').ForEach{
$null = Invoke-RestMethod -Method 'Get' -Uri ($Uri -f $_) -Headers $Headers
}
}On my system this consistently takes around 30-40 seconds in Windows PowerShell 5.1 x64, and 80-100 seconds in PowerShell 7.4.1 x64.
Expected behavior
If not equally fast, I expect PowerShell 7.4.X to be faster than Windows PowerShell.Actual behavior
More than twice as slow.Error details
No response
Environment data
PowerShell 7.4.1 x64 and Windows PowerShell 5.1 x64 on Windows 11 23H2Visuals
No response
Metadata
Metadata
Assignees
Labels
No labels