[wp-trac] [WordPress Trac] #34676: Optimize bulk plugin updates

WordPress Trac noreply at wordpress.org
Fri Nov 13 16:03:42 UTC 2015


#34676: Optimize bulk plugin updates
-------------------------+-----------------------------
 Reporter:  jipmoors     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Plugins      |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:  performance  |
-------------------------+-----------------------------
 When selecting more then one plugins to update the following things are
 done:

 * Maintenance mode on (if -a- plugin is active)

 * Per plugin:
 1. Get plugin info
 2. Download package
 3. Unpack package
 4. Install package

 * Maintenance mode off

 **Scenario:**
 10 plugins require updates.
 Only the last one is active = requires maintenance mode to be enabled.
 Server might not have the best connection to WordPress.org or other plugin
 resource.

 This means that the site will not be available during:
 * Downloading of all plugins
 * Unpacking of all plugins
 * Installing of all plugins

 This means at least (10*download request) + (10*unpacking) +
 (10*installing) = 30 actions.

 Not including optional plugin info request * 10.
 Also not including plugins that need to do delta's on tables or other
 upgrading scripts.

 Though only one plugin actually required the site to not be available,
 which would be (1*installing) = 1 action.

 **Ideal flow:**
 * Download all packages
 * Unpack downloaded packages

 * Determine per plugin if maintenance is required
 * Install plugin
 * Disable maintenance if next plugin is not active

 * Finally: disable maintenance if enabled
 * Remove all unpacked packages and downloads

 I can think of a performance argument to include the unpacking of packages
 in the maintenance mode because it might be a strain on the server, but
 functionally I don't think it should be.

 As far as I can see the only file that this is effectively handled in is
 `class-wp-upgrader.php`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34676>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list