[wp-trac] [WordPress Trac] #37114: Allow short-circuiting `get_post_class` for performance
WordPress Trac
noreply at wordpress.org
Fri Jun 17 13:41:33 UTC 2016
#37114: Allow short-circuiting `get_post_class` for performance
-------------------------------+------------------------------------
Reporter: bordoni | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template, performance
-------------------------------+------------------------------------
Comment (by bordoni):
@peterwilsoncc I've tested with WooCommerce, and it really doesn't seem to
slow down if we are dealing with a base query. Unless we use a `WP_Query`
with any of the these three arguments:
{{{#!php
<?php
array(
'update_post_term_cache' => false,
'fields' => 'ids',
);
}}}
Then it would go from 27 queries up to 240ish queries, with only two types
of product variation (taxonomies).
Which is not a huge problem bug also not dismissible I think, and the code
added here would still follow other WordPress Core functions with the
`pre_filter`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37114#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list