[xdebug-general] Re: Xdebug slows down response

From: Alex <alexf[@]itechwebhosting.com>
Date: Thu, 03 Dec 2009 16:51:53 -0500

Understood. I had a feeling the delay was necessary. I have toyed with
disabling xdebug and restarting apache when not in use. It would be nice
is to have an option where one could bypass most of xdebug using a
cookie just like the one that is used to start a debug session. I don't
know anything about the internals for extensions if this is even
possible. This would allow one to use it to debug one local site and
leave other sites running faster without the xdebug features and without
having to disable it in the php.ini file and restarting apache.

It would be also nice to do this when using the command line as well but
this seems more improbable.

As for the RAM usage, that startled me when I first seen it. But quickly
realized it was because of xdebug.

Bill Moran wrote:
> In response to Alex <alexf[@]itechwebhosting.com>:
>> Hi,
>> While working with the symfony framework and having xdebug enabled on my
>> Apache 2.2.14/PHP 5.3.1 Macbook Pro, I noticed that the local web
>> server's response times are much slower, about 1.5 seconds or more per
>> request. If I disable the xdebug extension, then that large delay
>> disappears.
>> I'm curious if this delay is avoidable.
> xdebug is recording every action the script takes, and the time it takes
> to do so. Adding a hook at every function call adds a certain amount of
> overhead.
> Can it be improved? Likely. But it's not an on/off switch. Reducing the
> overhead is probably going to involve a lot of hours of developer time
> to optimize the process. Even then, there's still going to be a
> performance hit, and one could speculate that it's not worth the effort,
> since the very nature of the software guarantees that there will always
> be _some_ performance hit.
> If you really want to be disturbed, take a look at how much more RAM
> your scripts use with xdebug enabled.
> In general, xdebug should only be enabled on development systems because
> of this overhead.
Received on Thu Dec 03 2009 - 21:51:56 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST