View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001658 | Xdebug | Uncategorized | public | 2019-04-21 14:48 | 2019-07-19 11:39 |
| Reporter | clewis2019 | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | no change required | ||
| Product Version | 2.7.0 | ||||
| Summary | 0001658: Very slow performance when xdebug extension is loaded, but not enabled | ||||
| Description | Running simple php benchmark script, http://www.php-benchmark-script.com, which just loops over a series of string and math operations with php 7.0, 7.1, or 7.3, results in execution time being 6-7 times slower than without the extension loaded. This is on a centos 7 system. strace -c shows: % time seconds usecs/call calls errors syscall 90.93 0.239892 10 25066 gettimeofday without xdebug loaded: % time seconds usecs/call calls errors syscall 34.58 0.010055 15 677 20 stat /etc/php.d/xdebug.ini: ;zend_extension=/usr/lib64/php/modules/xdebug.so | ||||
| Steps To Reproduce | run attached script with or without xdebug extension enabled: | ||||
| Additional Information | I was expecting that with xdebug loaded, but not triggered, the performance would be roughly the same as with it not loaded, but that is not what I have experienced. | ||||
| Tags | performance | ||||
| Operating System | lin | ||||
| PHP Version | 7.0.20-7.0.24 | ||||
|
|
The gettimeofday issue (top of your list), should be fixed in Xdebug 2.7.1: https://bugs.xdebug.org/view.php?id=1641 — Will you please try that? Besides that, Xdebug does have quite a bit of overhead, even it's enabled. I hope to fix that in Xdebug 3.0, as outline at https://derickrethans.nl/xdebug-experience.html |
|
|
I followed your suggestion and compiled the 2.7.1 version, but did not see any improvement: the overall performance was still about 6 times slower. The number of gettimeofday did not change. % time seconds usecs/call calls errors syscall 90.81 0.248393 10 25066 gettimeofday |
|
|
I am also running into this issue. I was using PHP 7.0 with xdebug 2.5.0 with no slowness when the extension was loaded and not enabled, but now, using PHP 7.3 with xdebug 2.7.1 and 2.7.2 (the 2 versions I tried) my application becomes extremely slow. I originally reported this issue here https://bugs.xdebug.org/view.php?id=1685 thinking I was running into another problem. |
|
|
I am closing out this issue, as there is no actionable issue here. I am reviewing Xdebug's performance for Xdebug 3.0. |