views:

268

answers:

5

Can anyone recommend some useful performance analysis tools for PHP scripts? Anything that could help me find problematic or unusually slow blocks of code, details about execution time, etc. would be really helpful. I know there are tools out there, but I'm wondering what people recommend as being the most useful and well-designed.

+4  A: 

XDebug's profiler is good. But then I'm a KDE user... I think you could install the KCacheGrind in other window managers though.

Vinko Vrsalovic
Wingrind is still functional for Windows based developers
Wimmer
MacCallGrind isn't too shabby for Mac folks (outside of virtual machines to run KCacheGrind, which is bottom line the best tool for parsing these callgrind dumps).
Ian Van Ness
+1  A: 

Xdebug profiler is pretty good but the CacheGrinder can be a little difficult to interpret.

Zend Platform (expensive if you're not running the developers license) will alert you to issue code and bad use of resources.

flungabunga
+6  A: 

Try webgrind. It gives you the profiling of CacheGrinder in an easy to read, browser based format. I'm on a Mac and it has made profiling a breeze.

gaoshan88
This looks really cool! I'll definitely be looking into this one.
Wilco
A: 

See SD's PHP Profiler. Measures frequence of execution across your entire application and provides a hotspot graphical display of highly-executed code. No changes necessary to PHP server to install this.

Ira Baxter
A: 

I'm personally a fan of XHProf, one of Facebook's open source initiatives. This, along with the XDebug dumps, is crucial in determining performance bottlenecks. Plus, the UI (and particularly, the weighted image-based callgraph functionality) rocks.

I have used this across the Gawker Media network in the past (again, along with XDebug-style dumps), to help focus our performance-geared development efforts.

Ian Van Ness