views:

48

answers:

1

I have routes defined for each module in my application, not heaps perhaps 10 for each module. I have also set up caching of these routes so that the ini files are only parsed once, then stored into a cache file as an array of Zend_Config_Ini objects. This file comes at 100kB. This file is then read each time the bootstrap is parsed (so every request) and the routes are added to the router.

I'd like to cut the time taken parsing these routes, but am I trying to over optimize here? Or am I missing something in the router with better caching system? (I currently just use the Cache core file).

On a side note, locally my app loads instantly but when live it takes a few seconds thinking about something. Other sites on the server are quicker, how can I find out what is slowing it down?

+1  A: 

This is a huge topic. Lots of research needed.

Do you have any metrics on where your app is having performance problems? I doubt parsing the ini file is the issue. Some basics to follow, in no particular order:

  1. Cache Zend_Db metadata: http://framework.zend.com/manual/en/performance.database.html
  2. Follow the Zend docs performance tips: http://framework.zend.com/manual/1.10/en/performance.html
  3. Read Padraic Brady's free online book: http://survivethedeepend.com/ He has a section on performance, but tips are spread throughout the book
  4. Are you using .htaccess? http://www.armando.ws/2009/03/how-to-run-zend-framework-with-no-htaccess-file/
  5. Do you use Xdebug? http://giorgiosironi.blogspot.com/2009/10/optimizing-php-application-in-5-minutes.html
  6. Opcode Cache? http://www.php.net/apc/
joedevon
Thanks for the links. I've already implented the zend based options but had never learnt about the default htaccess, will definitely check that and the book out. I think xdebug is the way forward for performance checking. If no-one else comes back with anything I'll accept this
Ashley