_get_cat_children is very inefficient
|Reported by:||ryan||Owned by:|
|Severity:||major||Keywords:||2nd-opnion category optimization hit-list|
_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?
Change History (21)
comment:5 charleshooper — 7 years ago
- Keywords 2nd-opnion added
- Owner changed from anonymous to charleshooper
- Status changed from new to assigned
comment:10 foolswisdom — 7 years ago
- Priority changed from low to high
- Severity changed from normal to major
comment:11 charleshooper — 7 years ago
- Owner charleshooper deleted
- Status changed from assigned to new