appservice: Performance improvements made by copilot#2203
appservice: Performance improvements made by copilot#2203
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements performance improvements primarily by parallelizing independent async operations using Promise.all. The changes target areas where multiple API calls or data fetches were previously executed sequentially, converting them to parallel execution to reduce overall latency.
Changes:
- Parallelized log entry detail fetching in deployment logs to fetch all details concurrently
- Parallelized client creation in function app ping operation
- Pre-fetched OS information for App Service Plans in parallel before processing
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| appservice/src/tree/DeploymentTreeItem.ts | Parallelizes fetching of log entry details using Promise.all, maintaining order and error handling |
| appservice/src/pingFunctionApp.ts | Creates both clients (kudu and generic) in parallel since they are independent operations |
| appservice/src/createAppService/LogAnalyticsCreateStep.ts | Changes parent class to AzureWizardExecuteStepWithActivityOutput for better activity tracking (not performance-related) |
| appservice/src/createAppService/AppServicePlanListStep.ts | Pre-fetches OS information for EP/WS plans in parallel to avoid sequential API calls during plan iteration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { IAppServiceWizardContext } from "./IAppServiceWizardContext"; | ||
|
|
||
| export class LogAnalyticsCreateStep extends AzureWizardExecuteStep<IAppServiceWizardContext & Partial<ExecuteActivityContext>> { | ||
| export class LogAnalyticsCreateStep extends AzureWizardExecuteStepWithActivityOutput<IAppServiceWizardContext & Partial<ExecuteActivityContext>> { |
There was a problem hiding this comment.
This change from AzureWizardExecuteStep to AzureWizardExecuteStepWithActivityOutput doesn't appear to be a performance improvement, unlike the other changes in this PR. The change is related to activity tracking/reporting rather than parallelization or performance optimization. Consider whether this change should be in a separate PR focused on improving activity output consistency, or if it was included here by mistake.
I tried loading this list of asps with my changes versus not and it seems marginally faster but can't be sure.
I tried to create 500 asps to do a better perf test, but Azure didn't love me DDOSing their servers and is rate limiting me. I'll keep trying to create more to get a better sense of how well it works.