Welcome Guest, Not a member yet? Register   Sign In
Reduce loading time
#1

(This post was last modified: 05-05-2017, 03:45 PM by paul.)

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
Reply
#2

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

Images, css and js
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

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
Reply
#4

Is all of your JavaScript at the bottom of your page just before the bottom body closing tag?
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(This post was last modified: 05-06-2017, 12:30 PM by natanfelles. Edit Reason: . )

(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.
Reply
#6

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

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
Reply
#8

(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?
Reply
#9

6 database query

[Image: 622519sql.png]
Reply
#10

The SELECT * will slow your queries down, your better off specifying you database fields.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB