View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001123 | Xdebug | Uncategorized | public | 2015-03-04 13:10 | 2018-07-17 07:22 |
| Reporter | ravage | Assigned To | |||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Linux 3.13.0-46-generic x86_64 | OS | Ubuntu Server | OS Version | 14.04 |
| Product Version | 2.3.1 | ||||
| Fixed in Version | 2.4.0beta1 | ||||
| Summary | 0001123: With Xdebug 2.3.1, PHPUnit with coverage is exponentially slower than without | ||||
| Description | After upgrading to Xdebug 2.3.1, running the unit test suite of an internal project takes exponentially more time with code coverage than without. It's a CakePHP 2.6.x application using PHPUnit 3.7.38 (use of PHPUnit 4.x+ not possible). The suite contains: PHP 5.5.9-1ubuntu4.6 (cli) (built: Feb 13 2015 19:17:11) Expecially integration tests of controllers are way slower than before. Nothing else has been changed except the Xdebug version. Interestingly I have yet not found any reports of 2.3.1 being so slow. | ||||
| Steps To Reproduce | Without Code Coverage
| ||||
| Additional Information | xdebug Supported protocols Revision Directive Local Value Master Value | ||||
| Tags | No tags attached. | ||||
| Operating System | Ubuntu Server 14.04 | ||||
| PHP Version | 5.5.5-5.5.9 | ||||
|
|
I can confirm this. 2.2.7 with coverage: 3 min 45 sec |
|
|
Same for me, for jenkins jobs, with phpunit 4.6 and php -v: PHP 5.6.8-1~dotdeb+wheezy.1 (cli) (built: Apr 22 2015 04:03:53) I've attached build time trend with coverage enabled. |
|
|
It is to be expected for the execution to be slower when XDEBUG_CC_BRANCH_CHECK is enabled. But without it the performance of the code coverage data collection with Xdebug 2.2 and 2.3 should be the same. |
|
|
Just to be clear: this slowdown is with XDEBUG_CC_BRANCH_CHECK disabled (not enabled). |
|
|
I can confirm the performance problem with 2.3.2, which came with the WPN-XM stack - downgrading to 2.2.7 is my temporary work-around too, it performs normally. |
|
|
I attached two valgrind/callgrind profiles generated with PHP 5.6.9 and both Xdebug 2.2.7 and 2.3.2. $ git clone https://github.com/sebastianbergmann/money.git |
|
|
I'm not sure, but I think this line https://github.com/xdebug/xdebug/blob/1eb61105f811d09bc90109c611083ac0fad62dc4/xdebug_code_coverage.c#L108 |
|
|
Fixed for 2.3.4 (if that gets released) and Xdebug 3.0.0 |
|
|
It looks like this problem still exists with PHP 7.2.6, XDebug v2.6.0, PHPUnit 7.2.3, and with processIsolation="false" |