Web management very slow after upgrade 4.0.1 to 5

Found the issue, it’s common_model.php function get_dashboard_details.

This is called every time a page is loaded (including AJAX calls).

The problem is the query run on line 172.

$data_array['no_of_calls'] = $this->db_model->getSelect('(ROUND(sum(billseconds) / 60.0, 0) * 60) as total_seconds ,count(*) as total_calls', 'cdrs', $date)->row_array();

This query is what’s holding up the page load times (especially on pages which make multiple ajax calls (basically anything with a grid on it).

For every column header on a grid, and every button on a page, an individual ajax call is made to translate the header of the grid and check the permission of the user to use the buttons defined.

Each time an ajax call is made, the above query is run again, I can see no good reason for this and setting the line to the below does not appear to have affected my installation’s ability to load dashboard data, and page load is now significantly faster.

$data_array['no_of_calls']  = [];

Before Change:

After Change:

3 Likes