Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#33345 new enhancement

Remove blocking API requests for update checks

Reported by: johnbillion's profile johnbillion Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: needs-patch
Focuses: administration, performance Cc:

Description

I'm getting pretty fed up with the blocking HTTP requests to api.wordpress.org in the admin area. Core, plugin, and theme update checks are all blocking and can happen on any admin screen once the corresponding transient expires.

These update checks should be converted to non-blocking requests, with an AJAX listener which polls the corresponding transients and displays the update count in the admin toolbar (and message in the footer) as necessary.

The Plugins screen can already be quite slow with a large number of plugins, and the plugin update check slows it down a ton. On the Plugins screen an AJAX listener should poll the corresponding transient and display the available plugin updates inline once it's completed, and toggle the "Update Available" tab (and its count) as necessary.

The AJAX listener only needs to be triggered if an update check has been triggered at the start of the page load.

Visiting the Updates screen would retain current behaviour.

Attachments (1)

33345-updates.diff (8.3 KB) - added by A5hleyRich 8 years ago.

Download all attachments as: .zip

Change History (2)

#1 @A5hleyRich
8 years ago

Hey @johnbillion,

I've started working on this issue and would love to get some preliminary feedback before digging in further. The current patch removes the API lookup from admin_init, but doesn't touch the plugin screens yet. I opted not to use the non-blocking method, because it seemed cleaner to fire off the request via AJAX and use the response directly to update the UI opposed to polling the server. Does this approach seem reasonable? Your thoughts would be appreciated.

Note: See TracTickets for help on using tickets.