|
3 | 3 | * Licensed under the MIT License. See License.txt in the project root for license information. |
4 | 4 | *--------------------------------------------------------------------------------------------*/ |
5 | 5 |
|
6 | | -import { type Site, type SiteConfigResource, type StringDictionary } from '@azure/arm-appservice'; |
| 6 | +import { type Site, type SiteConfigResource } from '@azure/arm-appservice'; |
7 | 7 | import { getDeployFsPath, getDeployNode, deploy as innerDeploy, showDeployConfirmation, type IDeployContext, type IDeployPaths, type InnerDeployContext, type ParsedSite } from '@microsoft/vscode-azext-azureappservice'; |
8 | 8 | import { ResourceGroupListStep } from '@microsoft/vscode-azext-azureutils'; |
9 | 9 | import { AzureWizard, DialogResponses, subscriptionExperience, type ExecuteActivityContext, type IActionContext, type ISubscriptionContext } from '@microsoft/vscode-azext-utils'; |
@@ -133,8 +133,11 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string | |
133 | 133 | void showCoreToolsWarning(context, version, site.fullName); |
134 | 134 |
|
135 | 135 | const client = await site.createClient(actionContext); |
136 | | - const siteConfig: SiteConfigResource = await client.getSiteConfig(); |
137 | | - const isConsumption: boolean = await client.getIsConsumption(actionContext); |
| 136 | + // Parallelize independent read-only calls: site config and consumption check |
| 137 | + const [siteConfig, isConsumption] = await Promise.all([ |
| 138 | + client.getSiteConfig(), |
| 139 | + client.getIsConsumption(actionContext), |
| 140 | + ]); |
138 | 141 | let isZipDeploy: boolean = siteConfig.scmType !== ScmType.LocalGit && siteConfig.scmType !== ScmType.GitHub; |
139 | 142 | if (!isZipDeploy && site.isLinux && isConsumption) { |
140 | 143 | ext.outputChannel.appendLog(localize('linuxConsZipOnly', 'WARNING: Using zip deploy because scm type "{0}" is not supported on Linux consumption', siteConfig.scmType), { resourceName: site.fullName }); |
@@ -167,9 +170,11 @@ async function deploy(actionContext: IActionContext, arg1: vscode.Uri | string | |
167 | 170 | context.deployMethod = 'flexconsumption'; |
168 | 171 | } |
169 | 172 |
|
170 | | - const appSettings: StringDictionary = await client.listApplicationSettings(); |
171 | | - |
172 | | - const durableStorageType: DurableBackend | undefined = await durableUtils.getStorageTypeFromWorkspace(language, context.projectPath); |
| 173 | + // Parallelize remote app settings fetch and local workspace durable storage detection |
| 174 | + const [appSettings, durableStorageType] = await Promise.all([ |
| 175 | + client.listApplicationSettings(), |
| 176 | + durableUtils.getStorageTypeFromWorkspace(language, context.projectPath), |
| 177 | + ]); |
173 | 178 | context.telemetry.properties.durableStorageType = durableStorageType; |
174 | 179 |
|
175 | 180 | if (durableStorageType === DurableBackend.SQL && isFlexConsumption) { |
|
0 commit comments