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 (

The image above shows the profile of PHPUnit's report generation code at revision 1473.

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.

The image above shows the profile of PHPUnit's report generation code at revision 1486, after I eliminated the

The image above shows the profile of PHPUnit's report generation code at revision 1488, after I eliminated the

The image above shows the profile of PHPUnit's report generation code at revision 1533 with disabled syntax highlighting.

The image above shows the profile of PHPUnit's report generation code at revision 1535 with the new statistics details.

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.

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.
PHPUnit_Util_Report_*) has become a bottleneck.
The image above shows the profile of PHPUnit's report generation code at revision 1473.

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.

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.
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.
The image above shows the profile of PHPUnit's report generation code at revision 1533 with disabled syntax highlighting.

The image above shows the profile of PHPUnit's report generation code at revision 1535 with the new statistics details.

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.

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.
Defined tags for this entry: code coverage
, cruisecontrol
, kcachegrind
, php
, phpunit
, profiling
, xdebug
22/10/2007 at 11:14 Permalink
Reply
24/10/2007 at 07:03 Permalink
Reply
22/10/2007 at 11:29 Permalink
good job, as always!
What tool did you use to generate the profiling graphs?
Greetings from Germany,
René
Reply
23/10/2007 at 08:47 Permalink
Reply
22/10/2007 at 15:15 Permalink
Reply