WordPress core committer Jonny Harris merged a patch into WordPress core for a 12-year-old ticket that he says has the potential to convey “an enormous impact on efficiency for customized pages.” The change, which shall be included within the upcoming 6.0 launch, stops pointless queries when builders are utilizing the
do_parse_request filter, due to a refreshed patch from contributor Paul Bearne.
Harris summarized the issue and the way the change improves efficiency within the commit message:
Builders of plugins and themes can use the
do_parse_requestfilter to hot-wire requests and hook in early to render customized pages. Nevertheless, even by these request might not want put up queries and 404 lookups to be run, they run anyway. This will ends in pointless SQL queries working on these requests. By including a return worth to the
parse_requesttechnique of the
WPclass, these queries can now be skipped.
WordPress core contributor Konstantin Kovshenin detailed the necessity for this alteration in a Twitter thread he printed in 2021, when soliciting assist for the ticket:
Harris carried out a fast overview of plugins that use the filter and mentioned he doesn’t anticipate breakages. The search discovered 133 plugins utilizing the filter. A number of the hottest ones embody Google’s Website Package plugin (1M+ installs), The Occasions Calendar (800K installs), and AMP (500K installs). Harris steered the change requires a dev notice, as it could have unanticipated unwanted effects. The dev notice is prone to be printed nearer to the time of launch. WordPress 6.0 is presently scheduled for launch on Might 24, 2022.