queue: Improve queries necessary for rendering
This removes a significant number of queries used to render the drop-down menu for the queues. Each queue displayed on the page previously required a database query to determine its children. This patch changes the strategy to fetch all the queues and organize them as a tree. The tree can then be walked as the menu is rendered and does not require any further queries. On my test system, it reduces the number of queries for the ticket listing page from 56 to 46.
Showing
- include/class.queue.php 38 additions, 0 deletionsinclude/class.queue.php
- include/staff/templates/queue-navigation.tmpl.php 16 additions, 2 deletionsinclude/staff/templates/queue-navigation.tmpl.php
- include/staff/templates/queue-subnavigation.tmpl.php 14 additions, 9 deletionsinclude/staff/templates/queue-subnavigation.tmpl.php
- scp/tickets.php 6 additions, 11 deletionsscp/tickets.php
Please register or sign in to comment