[wp-trac] [WordPress Trac] #3985: _get_cat_children is very
inefficient
WordPress Trac
wp-trac at lists.automattic.com
Sat Mar 17 02:41:59 GMT 2007
#3985: _get_cat_children is very inefficient
----------------------------+-----------------------------------------------
Reporter: ryan | Owner: anonymous
Type: defect | Status: new
Priority: low | Milestone: 2.2
Component: Administration | Version: 2.1.2
Severity: normal | Keywords: category optimization
----------------------------+-----------------------------------------------
_get_cat_children is slow and stupid. Doing DB queries to get the
children of each cat is faster than using _get_cat_children.
One proposal is to store an array that contains the hierarchy.
array(parent => child, child => grandchild). Categories that have no
children would not be present in the array. The drawback is that this
would require keeping the array in sync with category changes. Any other
suggestions to make creating the hierarchy more efficient while minimizing
DB queries?
--
Ticket URL: <http://trac.wordpress.org/ticket/3985>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list