WordPress 6.0 will introduce performance improvements for custom pages – WP Tavern

Lead WordPress author Jonny Harris has merged a patch into WordPress core for a 12-year-old issue that he says has the potential to bring “a massive effect to custom page performance.” The change, which will be included in the upcoming 6.0 release, stops unnecessary requests when developers use the do_parse_request filter, thanks to an updated patch from contributor Paul Bearne.

Harris summarized the issue and how the change improves performance in the commit message:

Plugin and theme developers can use the do_parse_request filter direct requests and log in early to view personalized pages. However, even though these queries may not require running post queries and 404 lookups, they still run. This can cause unnecessary SQL queries to be performed on these requests. By adding a return value to the parse_request method of WP class, these requests can now be ignored.

Core WordPress contributor Konstantin Kovshenin detailed the need for this change in a Twitter thread he posted in 2021, when asking for help with the ticket:

Harris did a quick review of plugins that use the filter and said he didn’t anticipate any breakage. The search found 133 plugins using the filter. Some of the most popular include the Google Site Kit plugin (over 1 million installs), The Events Calendar (800,000 installs), and AMP (500,000 installs). Harris suggested the change requires a dev note because it may have unintended side effects. The dev note is likely to be released closer to the release date. The release of WordPress 6.0 is currently scheduled for May 24, 2022.

Comments are closed.