#20665 closed defect (bug) (fixed)

wp.getUsersBlogs method runs out of memory when there are too many blogs

Reported by: mohanjith Owned by: nacin
Priority: normal Milestone: 3.5
Component: XML-RPC Version: 3.0
Severity: normal Keywords: has-patch needs-unit-tests commit
Cc: jbernal@…

Description

wp.getUsersBlogs method runs out of memory when there are too many blogs. But with the proposed changes (by avoiding switch_to_blog and restore_current_blog) you can list more blogs with same amount of memory.

Attachments (2)

class-wp-xmlrpc-server.php.diff (1011 bytes) - added by mohanjith 12 months ago.
20665.diff (914 bytes) - added by nacin 11 months ago.

Download all attachments as: .zip

Change History (10)

  • Component changed from General to XML-RPC
  • Keywords has-patch added

Yeah, the switch_to_blog() really doesn't make any sense here.

  • Version changed from 3.4 to 3.0

Assuming this came in with MU in 3.0.

  • Cc jbernal@… added

nacin11 months ago

  • Keywords needs-unit-tests commit added

20665.diff includes get_home_url() and some cleanup.

  • Milestone changed from Awaiting Review to 3.5
  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [21194]:

Don't use switch_to_blog() in wp.getUsersBlogs to improve performance and memory footprint. props mohanjith for initial patch. fixes #20665.

Note: See TracTickets for help on using tickets.