You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to how WP_Query initializes default query parameters, and ES WP Query's interaction with WP Query, the lazy_load_term_meta param ends up always being set to true when the internal query to fetch posts by id runs.
This ends up triggering get_the_terms() excessively, which leads to high numbers of cache and/or db reads.
The problem can be most readily seen by watching the $q var here:
Due to how WP_Query initializes default query parameters, and ES WP Query's interaction with WP Query, the
lazy_load_term_meta
param ends up always being set totrue
when the internal query to fetch posts by id runs.This ends up triggering
get_the_terms()
excessively, which leads to high numbers of cache and/or db reads.The problem can be most readily seen by watching the
$q
var here:es-wp-query/class-es-wp-query-shoehorn.php
Lines 218 to 220 in 5b6d5d0
Before
$query->parse_query();
is run,lazy_load_term_meta
is stillfalse
...yet after it has flipped totrue
.As a workaround, it can be bypassed with a filter like this:
The text was updated successfully, but these errors were encountered: