xdebug影响php运行速度
生活随笔
收集整理的這篇文章主要介紹了
xdebug影响php运行速度
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
我在本地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=100xdebug.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 運行的速度就超快了。
參考:
http://www.oschina.net/question/656655_102191
http://www.111cn.net/sys/CentOS/74770.htm
http://www.cnblogs.com/dreamhome/p/3218744.html
總結
以上是生活随笔為你收集整理的xdebug影响php运行速度的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 科普:TLS、SSL、HTTPS以及证书
- 下一篇: PHP编程中的并发