Welcome Guest, Not a member yet? Register   Sign In
Very slow if $data is big
#15

(01-25-2023, 09:40 AM)MarieveStrange Wrote: 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();
print_r($data['commandes_data']);exit; 


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!

Do you have a single array example what data you are pushing to the view from the 415 results?
Without personal client information of course.

To answer the view
It's not required to use this on every view, you can extend() this when needed.
I've got a order to PDF generator that holds different HTML header/footer all other content can be extended when needed.

Using this solution to do that, that's pretty fast on my side:
> see: https://codeigniter.com/user_guide/outgo...arser.html
Reply


Messages In This Thread
Very slow if $data is big - by MarieveStrange - 01-19-2023, 02:15 PM
RE: Very slow if $data is big - by InsiteFX - 01-20-2023, 12:52 AM
RE: Very slow if $data is big - by nc03061981 - 01-20-2023, 01:36 AM
RE: Very slow if $data is big - by davis.lasis - 01-20-2023, 02:46 AM
RE: Very slow if $data is big - by php_rocs - 01-20-2023, 09:45 AM
RE: Very slow if $data is big - by sheilaf - 01-20-2023, 12:19 PM
RE: Very slow if $data is big - by InsiteFX - 01-21-2023, 12:04 AM
RE: Very slow if $data is big - by MarieveStrange - 01-23-2023, 07:57 AM
RE: Very slow if $data is big - by superior - 01-23-2023, 08:54 AM
RE: Very slow if $data is big - by MarieveStrange - 01-24-2023, 01:02 PM
RE: Very slow if $data is big - by superior - 01-25-2023, 01:10 AM
RE: Very slow if $data is big - by MarieveStrange - 01-25-2023, 07:47 AM
RE: Very slow if $data is big - by superior - 01-25-2023, 08:39 AM
RE: Very slow if $data is big - by MarieveStrange - 01-25-2023, 09:40 AM
RE: Very slow if $data is big - by superior - 01-25-2023, 10:31 AM
RE: Very slow if $data is big - by MarieveStrange - 01-25-2023, 02:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB