Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#44368 closed enhancement (fixed)

Use total users in WP_User_Query in WP_MS_Sites_List_Table

Reported by: spacedmonkey's profile spacedmonkey Owned by: flixos90's profile 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 6 years ago.

Download all attachments as: .zip

Change History (7)

@spacedmonkey
6 years ago

#1 @desrosj
6 years ago

  • Version set to 4.3

#2 @desrosj
6 years ago

Tested this and works great for me. Good find!

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


6 years ago

#4 @flixos90
6 years 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
6 years 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
6 years ago

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