[wp-hackers] Proposal for a function commenting convention

Kimmo Suominen kimmo at global-wire.fi
Sun Oct 14 07:31:25 GMT 2007


Hi Travis,

Numbers are good, but I'm not sure you are using the right ones.  The
real time is wall clock time, and is affected by all jobs running on
the system.  I think the relevant number is the sum of user and sys
times.

Also, since you list e.g. the Apache version, it sounds like you are
possibly using something like wget to request an URL from the web
server (which causes the PHP script to execute).  This means that
the number of requests coming in to the web server at the same time
also affects the result, as well as other IP traffic on the box.

To get the impact on PHP execution time, you should run PHP directly
from the command line using the time command.  Maybe this is what
you did, but it is not clear to me from your message.

Even then you should probably run something like 1000 repeats of
each, and use the average (or median or something -- I'm by no means
well versed in statistics).

Best regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>


On Sun, Oct 14, 2007 at 12:17:44AM -0700, Travis Snoozy wrote:
> 
> There does seem to be a distinct overhead involved with parsing
> comments. Specifically, I observed a 7.5% increase in the test load's
> average run time, and (assuming that the difference between the
> commented/non-commented times on the test load can be added to the
> non-commented average page generation time) a possible 12.2% increase
> in page generation time.
> 
> * All tests were performed on the same box, using
> PHP 5.2.4_p20070914-pl2-gentoo, and WordPress 2.3/MySQL 5.0.44/Apache
> 2.2.6 (where applicable).
> 
> 
> Here's the data I collected (using the "time" command):
> 
> Running a file containing only the comments:
> Echoing zero to a million to /dev/null (with comments):
> Echoing zero to a million to /dev/null with no comments:
> Running an empty file (<?php?>):
> Dumping the commented code file to /dev/null with cat:



More information about the wp-hackers mailing list