Eric Hogue, a fellow PHP programmer up here in Montreal has written about Profiling a PHP Application. It’s a solid step-by-step setup of XHProf, XHGui, Xdebug for profiling with kcachegrind, and siege. Take a look!
When developing web applications, we often run into performance issues. People often blame PHP or MySQL for bad performance, but in most case the answer is not that easy. Blindly trying to optimize random parts of our applications can lead to some uneven results.
There are many available tools to profile a PHP application. Learning how to use them can help us pinpoint which parts are slow. With this information we can pick the optimizations that will give us the best results.