CodeIgniter Forums
Reduce loading time - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Reduce loading time (/showthread.php?tid=67994)

Pages: 1 2 3


Reduce loading time - paul - 05-05-2017

Hello



The home page of my website at a Server response time of 0,40 second

I would like to know how to reduce this time
but i don't know if this delay is because of my web hosting or because of a bad use of codeigniter

the profiler say:
Loading Time: Base Classes 

0.0858
Controller Execution Time ( Accueil / Index )  
0.3010
Total Execution Time  
0.3919


i have put a start benchmark->mark  at the start of my controller[Image: 431213startmark.png]


and a end benchmark->mark at the end of my controller[Image: 849476endmark.png]

the elapsed_time is 0.0826

could you help me to find the waste of time

Thx


RE: Reduce loading time - InsiteFX - 05-06-2017

The best place to start looking would be the resources that you are loading in your html header section.

Images, css and js


RE: Reduce loading time - paul - 05-06-2017

this is in the html header

[Image: 560235css.png]


And this is the loading time see wiht firefox
[Image: 558475tempsdechargement.png]

i think the problem in not the ccs


RE: Reduce loading time - InsiteFX - 05-06-2017

Is all of your JavaScript at the bottom of your page just before the bottom body closing tag?


RE: Reduce loading time - natanfelles - 05-06-2017

(05-06-2017, 04:22 AM)paul Wrote: this is in the html header

[Image: 560235css.png]


And this is the loading time see wiht firefox
[Image: 558475tempsdechargement.png]

i think the problem in not the ccs

This loading time in Firefox can be affected by your internet connection then the "problem" is not in CodeIgniter.

I can suggest that you use any Caching Driver available in your web hosting and cache your pages, if possible, with the contents minified. This is a great library that works for me: CodeIgniter Minifier - A HTML / CSS / Javascript Minification Library.

Also use browser caching to do not download static files every page loading and put your javascript to the bottom as @InsiteFX say.

If the lag is in the server you can see any details on GTmetrix.


RE: Reduce loading time - skunkbad - 05-06-2017

The profiler doesn't care about your assets. The execution time on the server has nothing to do with js, css, or images.


RE: Reduce loading time - paul - 05-07-2017

Yes i want reduce the execution time on the server 

server caching will be a solution
but i want know what is so long on my controler execution time


RE: Reduce loading time - Paradinight - 05-07-2017

(05-07-2017, 02:21 AM)paul Wrote: Yes i want reduce the execution time on the server 

server caching will be a solution
but i want know what is so long on my controler execution time

How many Database querys do you do? Do you use index?


RE: Reduce loading time - paul - 05-07-2017

6 database query

[Image: 622519sql.png]


RE: Reduce loading time - InsiteFX - 05-07-2017

The SELECT * will slow your queries down, your better off specifying you database fields.