How to find why phpunit testsuite is too slow?
===

At [phpMyAdmin][1] we suffer strange testsuite slowdown for some time. We've been able to trace the problems down to situation when xdebug is enabled (for code coverage) and there is an error inside ob_start/ob_end_clean block. Removing either of these does drastically reduce testsuite time.

                    xdebug       enabled      disabled
    ob_start failure tests
    enabled                       20 min        15 s
    disabled                      1 min         15 s

This is just to show how huge the difference is and why we would like to get rid of that.

At smaller scale, this can be shown with single test ``test/classes/PMA_Advisor_test.php``:

                    xdebug       enabled      disabled
    ob_start failure tests
    enabled                       7.2 s         0.1 s
    disabled                      2.6 s         0.1 s

Here the difference is removing of single dataset for one test (in case you would be looking into the sources, it's the last data set) and causes test to take less than half of the time!

At first glance it indeed looks like some bug in xdebug, but we have been unable to produce smaller testcase than above, what sounds suspicious. Any ideas how to debug the issue further of how to figure out what is actually causing this slow down?

[1]:http://www.phpmyadmin.net/