Project

General

Profile

Actions

Bug #21895

open

Site creation/cloning should be off-loaded and broken into batches

Added by Boone Gorges about 1 month ago. Updated 29 days ago.

Status:
New
Priority name:
Normal
Assignee:
-
Category name:
Site cloning
Target version:
Start date:
2025-01-28
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Site creation has always been slow. It involves the creation of a bunch of tables, which takes forever. When you are cloning a site, it gets much, much slower, especially when the source site has lots of content. This is a bad user experience, as the Create page hangs for a long time after submission with no feedback. And in certain cases, it can mean that the process fails altogether; see #21888.

Let's improve this. A few ideas:

1. In the short run, let's add a spinner or something similar to the submit button after it's been pressed. This way, at least the user will know that something is happening, and we can prevent duplicate presses. This is similar to #21887. Sara, could you make a recommendation about how this might look? I was thinking of adding a "disabled" style (making the "Create Site" button grey or semi-opaque) and adding a spinner (something like the attached?) inside of the button. We could also change the button text to "Creating Site..." or something like that.

2. We could offload creation into a separate request that is triggered via AJAX when the user clicks 'Create Site'. This way, we could provide feedback to the user once it's done, or perhaps send them onto the confirmation page automatically after completion.

3. We could split the creation process into multiple steps. WP's default site creation would be the first, and then copying from a clone source or from a template/layout would be the minimum, but the latter of these could be split up further. After clicking Create Site, we could have a progress indicator that has a dynamically updating checklist of steps (or something like that): "1. Creating site ... COMPLETE 2. Copying default settings ... COMPLETE" etc

4. Alternatively, if we don't want to make the user sit through this, we could do everything in the background. For group cloning, we handle the cloning of library content in a scheduled task. We could do something similar here. The potential downsides here are that it could take a few minutes (creating some confusion if the user clicks into the Dashboard within a few seconds of completion), and there's no clear way to give feedback if something fails unexpectedly.

Sara, do you have thoughts for what would feel best from a user's point of view?


Files

1495.gif (15.9 KB) 1495.gif Boone Gorges, 2025-01-28 10:43 AM
Create-site-timer.png (55.5 KB) Create-site-timer.png Sara Cannon, 2025-02-05 12:08 PM
groupblog-create.png (23.4 KB) groupblog-create.png Boone Gorges, 2025-02-07 11:34 AM
Peek 2025-02-07 10-08.gif (1.3 MB) Peek 2025-02-07 10-08.gif Boone Gorges, 2025-02-07 11:34 AM

Related issues

Related to CUNY Academic Commons - Support #21888: Trouble with site cloning New2025-01-27

Actions
Related to CUNY Academic Commons - Feature #21887: Disable group creation button while requests are in processNewBoone Gorges2025-01-27

Actions
Actions #1

Updated by Boone Gorges about 1 month ago

Actions #2

Updated by Boone Gorges about 1 month ago

  • Category name set to Site cloning
  • Target version set to 2.6.0
Actions #3

Updated by Sara Cannon about 1 month ago

Would something like this work? we could use the spinner that is on the export data page and add some friendly wording to the right of it

Actions #4

Updated by Boone Gorges about 1 month ago

Looks great to me. Thanks!

Actions #5

Updated by Colin McDonald about 1 month ago

Looks good to me, too. I wanted to ask about the specific places we'd be showing this, especially if it means the button should have different language for different things.

Will this only be for creating a cloned site, or for creating a new site as well? I believe the buttons say "Clone Site" and "Create Site" respectively for those. From what I've seen, creating a new site can also be slow. I haven't seen a lot of slowness with groups, but maybe it's good to be consistent? Or at least do it for Clone Group?

It gets a little more complicated for Group + Sites. If you're creating those new, each step has a Next button, ending with the site creation on the last Next button, which perhaps could also have the spinner?

I can't quite confirm what happens for cloning a Group + Site because of #21751 that I discovered during migration testing and just bumped for Jeremy to investigate.

Actions #8

Updated by Boone Gorges 29 days ago

  • Related to Feature #21887: Disable group creation button while requests are in process added
Actions #9

Updated by Boone Gorges 29 days ago

I think we need to attack this in phases. As a first pass, we should add the spinner and the helper text, and disable the button so that you can't press it again. I've got a working version of this - see attached gif.

Will this only be for creating a cloned site, or for creating a new site as well? I believe the buttons say "Clone Site" and "Create Site" respectively for those. From what I've seen, creating a new site can also be slow. I haven't seen a lot of slowness with groups, but maybe it's good to be consistent? Or at least do it for Clone Group?

For both site create and clone. I haven't touched the button text, so whatever it currently says is what it will continue to say. As for groups, I think we should do with groups whatever we do here, at least in terms of the spinner/help text interface. See #21887.

It gets a little more complicated for Group + Sites. If you're creating those new, each step has a Next button, ending with the site creation on the last Next button, which perhaps could also have the spinner?

The slow request is when the site is created, which I believe takes place after clicking the Next button on the Site step. So that's where we would need to have the spinner. As currently built, the spinner is added to the Next button, but no "hang tight" text - there's no obvious place to put it. See screenshot.

Note that these screenshots reflect only a UI change: spinner, helper text, disabling the button on click. It doesn't actually offload the creation process, or break it into chunks. I think the UI changes are helpful and could be shipped soon, while the under-the-hood changes will take a good deal more thought and testing, so will have to wait a bit.

Actions #10

Updated by Colin McDonald 29 days ago

The UI changes look great to me across the different creation endpoints Boone, thanks. And I agree about finalizing these sooner while looking at the offloading more long-term.

Actions

Also available in: Atom PDF