- Edited
Queue count which is called using SavedQueue::count(), making the tickets.php to load very slowly (almost 20-30 secs)
So I found that it is only called from 2 places
Autocron.php
// Run tickets count every 3rd run or so... force new count by skipping cached
// results
if ((mt_rand(1, 12) % 3) == 0)
SavedQueue::counts($thisstaff, false);
in ajax.php
url('^/queue/', patterns('ajax.search.php:SearchAjaxAPI',
url('^(?P<id>\d+/)?preview$', 'previewQueue'),
url_get('^(?P<id>\d+)$', 'getQueue'),
url_get('^addColumn$', 'addColumn'),
url_get('^condition/add$', 'addCondition'),
url_get('^condition/addProperty$', 'addConditionProperty'),
url_get('^counts$', 'collectQueueCounts'),
url('^(?P<id>\d+)/delete$', 'deleteQueue')
))
in queue-tickets.tmpl.php
128: $count = $count ?: $queue->getCount($thisstaff);
if I comment calling that method in production, the tickets page is loading in millisecs.
so, how to resolve this issue, I need queue counts and I also need the it to be quicker
osTicket Version v1.14.3 (f4f5bc6) — v1.14.8 is available
Web Server Software nginx/1.18.0
MySQL Version 8.0.22
PHP Version 7.4.33