I just run into a weird issue. Maybe a XDebug issue.
I just configured XDebug for the first time in my dev environment, it works okay,I use PhpStorm and the integrated IDE to test my code, it's fine.
The problem is actually when I don't use the debug mode, for instance, if I start to debug and then I stop the debug process then my PHP script will get slower, around 5/8 seconds to display a hello word. (but with some logic behind) while it takes less than one second with the debug mode running.
php.ini
zend_extension = "c:\wamp\bin\php\php5.4.12\ext\php_xdebug-2.2.3-5.4-vc9-x86_64.dll"
[xdebug]
xdebug.remote_autostart = 0
xdebug.remote_enable = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
I set autostart to false to avoid latency while I'm not using the XDebug mode. But once I started it I need to be in debug mode to use the "fast mode".
Any idea why?
I read some topics like Will enabling XDebug on a production server make PHP slower? and one of the answer seems to be about that.
I made some tests just enabling the module, without actually debugging, makes slows down a request on my development machine from 1 second to around 4 seconds