0

Developing a Symfony2 application with Xdebug activated for debugging, I notice a real performance issue. A page needs about 10s to load (even if the debug cookie isn't sent), disabling xdebug extension it only takes 2s !

My configuration is:

xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.profiler_enable_trigger=off
xdebug.trace_enable_trigger=0
xdebug.profiler_enable=0

xdebug.auto_trace=0
xdebug.trace_format=2

xdebug.trace_output_dir="C:/Inetpub/logs/PHP/profiles"
xdebug.trace_output_name="cachegrind.out.trace.%R.%p"
xdebug.remote_mode=req

xdebug.profiler_output_dir="C:/Inetpub/logs/PHP/profiles"
xdebug.profiler_output_name="cachegrind.out.profile.%t-%s"
xdebug.profiler_append=1

xdebug.max_nesting_level=250

Any idea?

Rolintocour
  • 2,934
  • 4
  • 32
  • 63
  • I experience the same and honestly have no idea why. I usually deactivate xdebug as long as not needed all together... also i get, why this is annoying. – DerStoffel Jun 03 '15 at 07:47

1 Answers1

1

This is totally normal. Xdebug has huge performance impact (event if you are not debugging currently). This is one of reasons that you should not install this extension on production environments.

Check these blog entries to get more info:

  1. PHP’s XDebug tracing overhead in production

  2. Careful: XDebug can skew your performance numbers

and this stackoverflow question

Community
  • 1
  • 1
Tomasz Madeyski
  • 10,742
  • 3
  • 50
  • 62