-
Notifications
You must be signed in to change notification settings - Fork 655
SiteExtension: Update site extension upgrade to perform incremental deployment #1531
Comments
Please also note that this may be solved in the future via compressed packages (hopefully) |
RE: [shrimpy] yes, i can confirm you hypothesizes. we do delete the folder before new version is installed The idea behind site extension installation is that, we expect content can be run right after we copy them to site extension folder. in your case, your app perform "node install" before running the site extension, that is why it is slow for you. You should pack all the dependencies together into your package. |
@shrimpy thank you for the confirmation. RE: You should pack all the dependencies together into your package. I don't believe this will solve the problem. The very slow delete operation (lots of individual files) will have to happen even if I pack all my dependencies into the package. This root of the problem is with how node packages work in combination with the networked filesystem that azure websites use. I just wanted to report that because the upgrade process is destructive that it takes a long time to complete. Unless azure websites internally have a faster way to bulk delete a directory I don't think this problem is solvable but I just wanted to make note of it anyway just in case someone might have a good way to solve this. I have contemplated making my site extension install itself outside of the site extension folder ie d:\home\myinstalledextension so that I can write my own upgrade routine to avoid the bulk delete however I'm not sure whether this is a good idea or not since there will be no way from the kudu UI to delete the extension once it's installed other than manually deleting the folder. However I don't feel as this would be friendly to people's website instance. |
@ashelley [shrimpy] this is true. deletion would also consume large amount of time if there are lots of files. @davidebbo what do you think? |
Swapping between two folders could add a fair bit of complexity in the system. And it also wouldn't save us from having to recreate all the files even for a minor upgrade. Maybe a better approach is to support incremental deployment, as we do for the site itself. We could even entertain the idea of git based site extensions, where upgrading just means pulling and checking out a different commit. |
originally (before I realized the whole folder was getting deleted on upgrade) I had the logic in my install.cmd to do this:
However, obviously because of the previous delete this did not help. But i tried :( |
@davidebbo @ashelley |
@shrimpy yes an incremental deployment would be great and would solve the issue. |
Hello,
The process for updating a node.js based site extension is extremely slow.
I have hypothesized that this is because the whole site extension directory is deleted before a new version is installed.
The actual reproduction steps for this problem are hard to explain/setup and hard to measure so I have created a simulation to show the effects of this problem.
Here is a typical package.json with some amount of dependencies
package.json
Here is a power shell command to simulate what would happen during a site extension upgrade
install-perf-test.ps1
Here is a screen shot of the simulation:
Expected results:
Ideally the deployment/upgrade of a node base site extension would as fast as deploying a website. For example using the above package.json as the basis for an app this is how long it takes:
In this simulated scenario it was 23 seconds vs 73 seconds to upgrade a website vs a site extension. In reality to upgrade an actual node based site extension it is taking 2-4 minutes (with no binary dependencies).
Maybe in the future there is some how a better way to deploy a site extension than by deleting the whole directory and installing from scratch or as an alternative use a faster delete method internally to mask the problem temporarily.
The text was updated successfully, but these errors were encountered: