Professional CodeIgniter

(singke) #1

Chapter 9: Security and Performance


287


Now visit the home page and scroll down. You should see a table giving details on how your application
performed. You ’ ll see entries for controller load time, queries run, and other data. It should look
something like Figure 9 - 1.

Figure 9 - 1

According to the example, the total execution time for the home page was about half a second. This is
OK for a development server, but not acceptable for a real - life eCommerce site. It ’ s time to start acting on
this information to improve the situation.

Compressing Output


One obvious way to speed up your home page is to turn on output compression. Doing so enables Gzip
output compression for faster page loads. All you have to do is set $config[‘compress_output’] to
TRUE in config.php, and CodeIgniter will test to see if the server its on supports Gzip compression. If so,
then the server will use Gzip to speed things up.
Free download pdf