您的位置:首页 > 编程语言 > PHP开发

xdebug影响php运行速度

2015-11-27 21:23 465 查看
我在本地wamp的环境下面加了xdebug用来调试,但是我发现wordpress运行速度好慢,所有程序运行变得也很慢。开始以为是数据库有问题,找了半天,发现把xdebug的扩展去掉,就正常了。

目前配置:

[Xdebug]
;zend_extension="ext/php_xdebug-2.3.3-5.4-vc9-nts.dll"
;xdebug.var_display_max_children=128
;xdebug.var_display_max_data=512
xdebug.var_display_max_depth=10
xdebug.max_nesting_level=100

xdebug.auto_trace= "On"
xdebug.collect_params= "On"
xdebug.collect_return= "On"
xdebug.trace_output_dir="xdebug/trace"
xdebug.profiler_enable= "true"
xdebug.profiler_output_dir="xdebug/profiler"
xdebug.profiler_append = 1
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable= "On"
xdebug.remote_autostart = "On"
xdebug.remote_host=192.168.36.101
xdebug.remote_port=9000
xdebug.remote_handler = "dbgp"


安装xdebug前后运行截图:

安装前



安装后



可能原因:
速度慢并不是 xdebug 运行慢,而是配置了 xedebug ,它首先会去尝试连接调试服务器,连接不上才直接返回 php 结果。如果这时候打开 phpstorm 的调试监听,这时候 php 运行的速度就超快了。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: