[xdebug-general] Re: Xdebug slows down response

From: Bill Moran <wmoran[@]collaborativefusion.com>
Date: Thu, 3 Dec 2009 14:47:31 -0500

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.

-- 
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/
Received on Thu Dec 03 2009 - 19:52:36 GMT

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