CodeIgniter Forums

Full Version: Reduce loading time
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
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
The best place to start looking would be the resources that you are loading in your html header section.

Images, css and js
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
Is all of your JavaScript at the bottom of your page just before the bottom body closing tag?
(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.
The profiler doesn't care about your assets. The execution time on the server has nothing to do with js, css, or images.
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
(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?
6 database query

[Image: 622519sql.png]
The SELECT * will slow your queries down, your better off specifying you database fields.
Pages: 1 2 3