WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 13 months ago

Last modified 9 months ago

#44368 closed enhancement (fixed)

Use total users in WP_User_Query in WP_MS_Sites_List_Table

Reported by: spacedmonkey Owned by: flixos90
Milestone: 5.1 Priority: normal
Severity: normal Version: 4.3
Component: Networks and Sites Keywords: has-patch
Focuses: multisite Cc:

Description

Currently WP_MS_Sites_List_Table loads ALL user ids into an array and count them. This is extremely wasteful. The code can simply just the total users, that counts the rows in the database.

Attachments (1)

44368.diff (936 bytes) - added by spacedmonkey 13 months ago.

Download all attachments as: .zip

Change History (7)

@spacedmonkey
13 months ago

#1 @desrosj
13 months ago

  • Version set to 4.3

#2 @desrosj
13 months ago

Tested this and works great for me. Good find!

This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.


13 months ago

#4 @flixos90
13 months ago

  • Milestone changed from Awaiting Review to 5.0
  • Owner set to flixos90
  • Status changed from new to reviewing
  • Type changed from defect (bug) to enhancement

#5 @flixos90
13 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 43382:

Multisite: Count users in a more performant way when listing sites in the network admin.

Props spacedmonkey.
Fixes #44368.

#6 @flixos90
9 months ago

  • Milestone changed from 5.0 to 5.1
Note: See TracTickets for help on using tickets.