views:

74

answers:

5

I am about to launch a CodeIgniter web application. Any recommendations on what I should do to maximize performance of my application? I'm thinking memcached and an accelerator (though I am not sure which one). Suggestions?

A: 

you can use both is the simplest answer.

RobertPitt
+1  A: 

memcached is great, if you need more datatypes Redis is a great alternative too. An Opcode cache like APC could help. PHP 5.3.3's new SAPI (FPM) could help a lot if you don't want to go with the traditional mod_php way.

racetrack
+1  A: 

You can use an accelerator, like APC. Any sort of caching will help if its applied in the right area's.

I would suggest you profile your code runtime using Xdebug and Webgrind in order to find out where its running slowly, and go from there with any optimisations.

You can also do things like move things in your htaccess to the server config and disable htaccess, so that the server isn't wasting time looking in every directory for them.

devians
A: 

Performance is a very broad term. As caching is not the only issue. You need to make sure that you have a good database design and structure and that you are querying it in an appropriate and efficient manner.

Also you might want to consider profiling, before you go on to caching, to see if it is indeed faster then regeneration.

Edit:

Have a look at the following benchmarks from AventLabs

Russell Dias
+1  A: 

To maximize performance, minimizing database requests you must. Denormalize tables before you hack on memory caches. And more importantly run your application through xdebug first, to check out the cachegrind output.

mario