Very slow if $data is big |
Ok. I have done more tests. First of all, I've commented the other queries to test one thing at a time. I've also emptied the view to see only the header and footer.
With this modifications, the Request loading time is 4016. With a limit of 200, it takes 3038 to Request to load. With a limit of 100, it takes 2039 to Request to load. With a limit of 10, it takes 1396 to Request to load. When executing the full query in phpMyAdmnin, I have this: Total of 415, processing in 0.0054 second(s). It's very quick. If I print the result object in PHP ($query->getResult()), the duration loading of Request is 35! If I do this: PHP Code: $data['commandes_data'] = $this->CommandesModel->get_commandes(); The duration of Request is 37. The only code after this is sending $data to the view: PHP Code: return $this->template->renderConnected("commandes_view", $data); Here is the renderConnected() function: PHP Code: public function renderConnected($view, $data = []) This function is in app/Libraries/Template.php file. Does the problem comes from this function? I also want to say that other pages with other queries are loading very fast, I have this problem with orders and invoices pages only, the pages like companies, projects, clients, etc. are loading at a normal pace. Thank you so much for helping me with this!
--
MarieveStrange Web Programmer |
Welcome Guest, Not a member yet? Register Sign In |