[wp-trac] [WordPress Trac] #35381: Introduce `WP_Term_Query`

WordPress Trac noreply at wordpress.org
Thu Apr 28 21:12:15 UTC 2016


#35381: Introduce `WP_Term_Query`
-------------------------------------------------+-------------------------
 Reporter:  boonebgorges                         |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-testing dev-         |  Resolution:
  feedback                                       |     Focuses:
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 I have been reviewing performance in the WordPress core and noticed that
 all the terms functions are the worst performing in my tests. All of the
 terms functions performance a high number sql queries (with joins) and
 there is no consistent caching method. Many of these functions do not
 cache at all. I have done a quick search of the code base of functions
 what query the terms table. Perhaps the internals of these functions can
 be replaced to use WP_Term_Query. I have ordered this list in order
 likelyhood they could implement WP_Term_Query.

 get_terms
 get_term_by
 term_exists
 wp_get_object_terms
 wp_unique_term_slug
 _split_shared_term
 wp_insert_term
 global_terms

 Like the WP_Site_Query ticket, the patches should be broken up two. One
 for the class and the other for the implementation.  Otherwise, good work
 @flixos90

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35381#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list