Profiling and Optimizing PHPUnit

Now that collecting code coverage information is not slow anymore (as of Xdebug 2.0.1), PHPUnit's report generation code (PHPUnit_Util_Report_*) has become a bottleneck. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1473. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1475, after I made the report a code coverage report only. The test result aspect of the previous report was not very usefull, made the report generation unneccassary complex and expensive, and should be handled by CruiseControl, for instance, anyways. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1486, after I eliminated the PHPUnit_Util_Array::sortRecursively() method calls. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1488, after I eliminated the PHPUnit_Util_Report_Node_File::tokenToColor() method calls. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1533 with disabled syntax highlighting. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1535 with the new statistics details. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1586 after applying a set of performance patches by Hubert Roksor. Profiling PHPUnit's Report Generation The image above shows the profile of PHPUnit's report generation code at revision 1603 after applying another set of performance patches by Hubert Roksor.