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. Built from https://develop.svn.wordpress.org/trunk@36524 git-svn-id: http://core.svn.wordpress.org/trunk@36491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
142 KiB
142 KiB