Streamlined the site-creation process #1013
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As seen on https://sprint.ly/product/27143/item/1333
Creating sites when you're in an org with a large number of sites is time-consuming. Here are the three scenarios:
Experiment
Cycle through this method for each of the three scenarios, alternating.
Each scenario was run 10 times and the numbers averaged.
No org, no sites
sites create
time:real 1m55.579s
user 0m0.387s
sys 0m0.088s
Actions:
Pantheon Employees org member, many sites, not adding site to org
sites create
time:real 2m15.851s
user 0m0.566s
sys 0m0.210s
Actions:
Pantheon Employees org member, many sites, adding site to org
sites create
time:real 3m37.987s
user 0m0.677s
sys 0m0.218s
Actions:
Proposed Solution
So there are three things slowing org members down when they create sites:
We can stop #3 entirely and ameliorate 1 and 2 by allowing the user to put in a UUID for either the org or the upstream, which will then skip the checks required when a name is given instead.
Re-testing
Each scenario was run 10 times and the numbers averaged.
No org, no sites
sites create
time:real 1m53.251s
user 0m0.351s
sys 0m0.090s
Actions:
Pantheon Employees org member, many sites, not adding site to org
sites create
time:real 1m32.016s
user 0m0.320s
sys 0m0.093s
Actions:
Pantheon Employees org member, many sites, adding site to org
sites create
time:real 1m41.214s
user 0m0.344s
sys 0m0.096s
Actions:
-Starts site-creation workflow
-Checks the status of that workflow 21 times
-Pulls in basic info for the new site