找出您的PHP代码在哪里变慢(性能问题) [英] Find out where your PHP code is slowing down (Performance Issue)
问题描述
这是我的第一个问题.
我有我公司最近要维护的内部申请.这些应用程序是用PHP构建的,其编码(OO,DB Abstraction,Smarty)相当好,没有WTF-ish的含义.
I have a internal application for my company which I've been recently ask to maintain. The applications is built in PHP and its fairly well coded (OO, DB Abstraction, Smarty) nothing WTF-ish.
问题在于应用程序非常慢.
如何找出导致应用程序速度下降的原因?我已经对代码进行了优化,以使数据库查询很少,因此我知道这是需要一段时间才能执行的PHP代码.我需要获得一些可以帮助我解决此问题的工具,并且需要制定一种策略来检查我的代码.
How do I go about finding out what's slowing the application down? I've optimized the code to make very few DB queries, so I know that it is the PHP code which is taking a while to execute. I need to get some tools which can help me with this and need to devise a strategy for checking my code.
我可以自己执行检查/策略工作,但是我需要更多的PHP工具来确定我的应用程序在哪里发展.
I can do the checking/strategy work myself, but I need more PHP tools to figure out where my app is crapping up.
有想法吗?
推荐答案
我使用了 XDebug配置文件最近处于类似情况.它输出一个完整的配置文件报告,可以用许多常见的分析应用程序读取(但是无法给您列表,我只是使用了slackware附带的列表).
I've used XDebug profiling recently in a similiar situation. It outputs a full profile report that can be read with many common profiling apps ( Can't give you a list though, I just used the one that came with slackware ).
这篇关于找出您的PHP代码在哪里变慢(性能问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!