ASTPP 6 Common Model issue get_dashboard_details()

Please consider removing line #35 as it is causing huge delay for other pages load time by calling get_dashboard_details() function.


You could discuss the issue here on why you think it is causing a delay then do a pull request

Ok. Here are my findings

  1. Have noticed massive slowness on loading dashboard and other pages.
  2. Initially thought it was due to my call load where I have more than 120K calls per day with 4.45 min median call time
  3. I did the needful on mysql db optimization and was having 99% table open cache efficiency and 91% innodb buffer pool usage.
  4. Then did a mysql client connections checkup and did an analysis while traversing through the pages
  5. Found that common_model.php near line 205 → $data_array[‘no_of_calls’] = $this->db_model->getSelect('(ROUND(sum(billseconds) / 60.0, 0) * 60) query popping up on all web-page client connections.
  6. It was taking more than 8s to execute so the pages
    7.Then I disabled calling on get_dashboard_details() on line number 35 and tested.
  7. Issues solved.

Now tell me how the hell I am raising a PR without knowing the actual use of the function ? I was just providing some of my findings just to help Original owner of the code and community.

Being effective for my problem does not means it is correct and PR worthy isn’t it ?

Maybe you should try this fix as reported by @sman123

1 Like

But this is different. Common_Model is being called by the CI Auto-loader it seems.

@devangn can check on this pls ?

By your response, I take it you did not read all of that thread in the link I sent you to.