Make WordPress Core

Opened 10 years ago

Last modified 2 months ago

#27776 assigned defect (bug)

WordPress API timeouts should be cached to avoid slowing down the admin

Reported by: brandonwamboldt's profile brandon.wamboldt Owned by: pbearne's profile pbearne
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Administration Keywords:
Focuses: performance Cc:


The admin does several calls to the WordPress API, such as from the wp_check_browser_version function. These calls don't cache timeouts, which means if the API is consistently timing out the admin is slow on every load as all of these calls must timeout before the page can load.

I propose we cache timeouts using transients, for a day.

This behavior has been present since at least 3.3 and is still the behavior on trunk.

Change History (7)

#2 @MikeHansenMe
10 years ago

I too have run into this problem.

#3 @DrewAPicture
9 years ago

  • Component changed from General to Administration
  • Focuses administration removed

#4 @DrewAPicture
9 years ago

  • Focuses performance added

#5 @valendesigns
9 years ago

I think caching for an entire day could be overkill, since the problem could be intermittent and not last 24 hours. Something along the lines of 30 minutes seems reasonable enough to free up resources and still be actively looking for an API connection.

#6 @pbearne
2 months ago

  • Owner set to pbearne
  • Status changed from new to assigned

The question that I have is whether it should be in the wp_remote calls rather than in the consuming call

Will this still be needed for the new admin?

Happy to add the code if still needed

#7 @pbearne
2 months ago

added some tests for wp_check_browser_version in

But could get the call to time out so I wonder if we need to do this

Note: See TracTickets for help on using tickets.