![]() |
Optimising CodeIgniter Code - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Optimising CodeIgniter Code (/showthread.php?tid=43958) |
Optimising CodeIgniter Code - El Forum - 07-28-2011 [eluser]lachavvy[/eluser] Hi guys, I'm working on a site at the moment http://premier5s.com and it's pretty much complete but I'm just optimising the code so it runs a tad quicker. After doing some tests from google's speed online and the WebPageTest it's coming back that I should: 1 - Set an expiry on my images and javascript, which I thought I already had done that, but clearly I amn't doing it right is there a way in CI to do this properly? 2 - To apply GZIP compression on my javascript hosted locally. I have set the variable in CI within the config file to TRUE, so I thought this would do this automatically. Could anyone shed some light on these problems as I'm thinking later down the line when I have lots of content I want it to still be as quick as possible. Thanks in advance Optimising CodeIgniter Code - El Forum - 07-28-2011 [eluser]fedeisas[/eluser] This has nothing to do with optimizing CodeIgniter's code. You can set your ETAGS and gzip configs using your .htaccess file. That's related to Apache's configuration, not CodeIgniter. After taking a look to your homepage, I thinks that's pretty light ( < 200kb). As your site grows, it's more likely to have SQL-related bottle-necks and you'll have optimize some queries. Or you might want to use some sort of cache (CodeIgniter comes blunded with a cache system). But I would not recommend to hack the core trying to shorten load times. Good Luck! Optimising CodeIgniter Code - El Forum - 07-29-2011 [eluser]lachavvy[/eluser] Hey fedesias, thanks for looking into this, you're right my sql is a bitbit poor and ill probably have the biggest gains by doing that properly! Thanks again! |