Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34030 closed defect (bug) (fixed)

Plugins API: Request only data which is needed

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 4.4 Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: performance Cc:

Description (last modified by ocean90)

There are some plugins_api() calls which are requesting all data fields even if only some of them are used. We should define the fields to reduce execution time and memory usage.


'short_description' => true,
'description' => false,
'sections' => true,
'tested' => true,
'requires' => true,
'rating' => true,
'ratings' => true,
'downloaded' => true,
'downloadlink' => true,
'last_updated' => true,
'added' => true,
'tags' => true,
'compatibility' => true,
'homepage' => true,
'versions' => false,
'donate_link' => true,
'reviews' => false,
'banners' => false,
'icons' => false,
'active_installs' => false,
'group' => false,
'contributors' => false,

Attachments (2)

34030.update-core.patch (993 bytes) - added by ocean90 9 years ago.
5 plugins: Time: -0.3s, Memory: -0.1M
34030.update.patch (1.1 KB) - added by ocean90 9 years ago.

Download all attachments as: .zip

Change History (4)

9 years ago

5 plugins: Time: -0.3s, Memory: -0.1M

#1 @ocean90
9 years ago

  • Description modified (diff)

#2 @ocean90
9 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 34598:

Plugins: Don't request all fields via plugins_api( 'plugin_information' ) for plugin installs and update checks.

The Plugins API returns a lot of data by default (see [34596]) but when installing or checking for updates we don't need all of it. To save bandwidth, memory and time request only required fields.

Fixes #34030.

Note: See TracTickets for help on using tickets.