Very slow if $data is big |
Because I don't want to include header, menu and footer in every view files. But It gave me the idea of testing with the default loading view of CI:
PHP Code: return view('commandes_view', $data); And it still very slow, so now I know that the problem doesn't come from my renderConnected() function. To answer your second question, no, it's very fast with this in the controller: PHP Code: $data['commandes_data'] = $this->CommandesModel->get_commandes(); After all the testing, the problem still seems to be with passing a big multiple array of multiple arrays and objects ($data) to the view. But only with the two pages that have the most values to show. I don't know what I can do to make this faster. Maybe calling the datas with Ajax after the pages loads, so the $data variable passed to the view will me a much smaller and the Ajax calls return the data in JSON. I'll try this and let you know my conclusions. By then, if you have any suggestions, they are welcome. Thanks again!
--
MarieveStrange Web Programmer |
Welcome Guest, Not a member yet? Register Sign In |