wordpress-develop
wordpress-develop copied to clipboard
wp_dashboard_recent_comments function: avoid unnecessary SQL query
Tune wp_dashboard_recent_comments performance:
- further reduce the number of
countcalls (related to the history of changes in this function) - harden while-loop condition to avoid SQLs when the last query fetched less than what was aimed (next query fetches nothing)
Trac ticket: https://core.trac.wordpress.org/ticket/64506
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.