vscode-azureappservice
vscode-azureappservice copied to clipboard
App Service deploy running really slow
I've noticed that when deploying an app, the deployment takes quite a while; tens of minutes (notice timestamps below). Observing the Output log, it seems to get hindered on the Creating a zip package ...
step. The extension version is 0.23.0 on Windows 11 (Build 22538). The app in question is a simple ReactJS app that I created following this tutorial.
6:18:01 PM app-ryhill-msalreact: Starting deployment...
6:18:02 PM app-ryhill-msalreact: Creating zip package...
6:34:24 PM app-ryhill-msalreact: Zip package size: 79.1 MB
6:34:28 PM app-ryhill-msalreact: Fetching changes.
6:34:30 PM app-ryhill-msalreact: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/cebb9097-723a-4311-9a8c-94987383e257.zip (75.42 MB) to /tmp/zipdeploy/extracted
6:35:19 PM app-ryhill-msalreact: Updating submodules.
6:35:20 PM app-ryhill-msalreact: Preparing deployment for commit id '970326dc0b'.
6:35:20 PM app-ryhill-msalreact: Repository path is /tmp/zipdeploy/extracted
6:35:20 PM app-ryhill-msalreact: Running oryx build...
6:35:20 PM app-ryhill-msalreact: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform nodejs --platform-version 14 -i /tmp/8d9dd36b0398260 -p compress_node_modules=tar-gz --log-file /tmp/build-debug.log

The App Service extension has to zip your project before deploying, and it looks like your zip file is around 80 MB, so I think that it's taking a while to zip it. Are you excluding the node_modules when deploying? For a simple ReactJS app, that's a pretty large file.
I'm not sure if there is much we can do on our end to increase the speed of zipping the projects, but we can investigate our zipstream library.
If you click Yes on this prompt:
It should increase performance of your deployment. It'll add a setting to ignore your node_modules when deploying.
I have a similar issue with a python flask app and some wheels that I need to upload. Even though I have 100 Mbps upload, the upload speed is 1 Mbps from the zipstream. My deployment fails with a request timeout after approx. 30 minutes. I cannot imagine that my computer can only zip with 1 megabit (=128kb) per second. Actually zipping the whole directory (without ignoring .vscode or any other directory) via 7-zip took approx 5 seconds and creates a 125mb file. EDIT: Zip deployment via azure cli worked without any problems.
Additional information: Running in WSL with the following vscode version
Having the same issue with a completely blank template. I'm new to all this so I'm just testing out the workflow. PowerShell Event Grid Trigger template, publish to Function App. I'm in minute 18 zipping. Total folder size is less than 4 KB.
Not running in WSL. Win 11 Pro
We've made several improvements to deployment since this issue. Hopefully we can close this issue as resolved, but please re-open if the deploy is still taking forever to zip up your project.