Welcome Guest, Not a member yet? Register   Sign In
TTFB realy heavy

Hi guys,

I am new to the codeigniter's forum, and i would like to ask you something about the time to first byte in your webapp.

I always developed mine under EasyPHP web server, and i always had a heavy TTFB, so i am wondering if it is due to my computer or stuff like that. I dont think i am doing wrong with not needed stuff, my current project is realy lite..

I just read something about ipv4 & ipv6 over SQL queries that might take more than 1sec because MySQL could not resolve localhost with ipv6 so he switched to ipv4... going for instead did not solve my issue so i tried some caching stuff.

I gained 0.5s with this but TTFB still over 1s and its pretty hard, someone have an idea about what is going on ? 

Ty in advance

Best regards.


Use the CodeIgniter Profiler to check your database queries etc;
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

There are so many variables such as the machine (cpu/memory), the network and network speed, the operating system, firewalls, your webserver (HTTPD in this case), the application itself, and more of course. I haven't used anything like EasyPHP, so I cannot speak for it. My typical stack is Ubuntu, Nginx, PHP-FPM, CloudFlare CDN. My maximum first byte is 0.5 seconds.

Are you using a CDN? It will make the load times more consistent as opposed to loading from a single server.

Well i am on windows 7 , and im not using any CDN, only requesting google for fonts , but it appear after the http response, my issue probably comes with my computer setup.

What is codeigniter profiler?

In your controller add:

PHP Code:

Then your webpage will have lots of useful stuff appended to it.

In the docs: https://www.codeigniter.com/user_guide/g...iling.html

You may also be interested in benchmarking: https://www.codeigniter.com/user_guide/l...hmark.html

Theme © iAndrew 2016 - Forum software by © MyBB