mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-17 17:54:25 +00:00
d03ae82c32444a4f1ed7015389d94b5cc170741f
WP_Query lazyloading logic, for better performance.
Lazyloading for comment meta and term meta, introduced into `WP_Query` in 4.4, used flags - `updated_term_meta_cache` and `updated_comment_meta_cache` - in an attempt to prevent cache priming from happening more than once per query object. This technique was mostly effective, but not entirely efficient, since the flag didn't prevent the `lazyload_*_meta` callbacks from running. The obvious solution - removing the filter callback after it'd be run once - was dismissed for 4.4 because of concerns that `remove_filter()` could disable lazyloading too generally in the context of nested queries, due to the way `_wp_filter_build_unique_id()` doesn't always build sufficiently unique IDs for similar objects. However, further testing shows that this concern is only valid in a very small subset of cases, while the cost of keeping the query objects in memory, via the `$wp_filter` global, is quite significant. As such, this changeset removes the flags in favor of the `remove_filter()` technique. See #35454, #35816. git-svn-id: https://develop.svn.wordpress.org/trunk@36524 602fd350-edb4-49c9-b593-d223f7449a82
Description
No description provided
Languages
PHP
80.5%
CSS
9.4%
JavaScript
8.5%
SCSS
0.9%
HTML
0.7%