From: grandadmirale at yahoo dot com Operating system: Linux PHP version: 4.3.2 PHP Bug Type: Performance problem Bug description: Performance problem with print on large ammounts of html
Description: ------------ When using large ammounts of html (printing all at the same time or not) there is a major slowdown while php increases the buffer to allow for more html to be outputted. This is not a bug specific to my software as you can see in example, it should NOT take 1 second to execute phpinfo() when my entire script can (when not using large ammounts of html) execute in 0.05 seconds... if it hits those large ammounts though, the buffer goes up as well as the time, sometimes all the way up to 1 or 2 seconds which is rediculous. IF output_buffering is set high enough in php.ini it runs perfectly fine in the time it should, but since this is not changeable via script it becomes a major problem for scripts that need to output large ammounts of data jumping to multiple seconds of execution time when it should only be a portion of a second. Reproduce code: --------------- <?php function getmicrotime() { $time = explode(' ',microtime()); return ((float)$time[0] + (float)$time[1]); } $timeStart = getmicrotime(); phpinfo(); print (getmicrotime() - $timeStart); ?> Expected result: ---------------- It to execute in much under 1 second. Actual result: -------------- It executes in anywhere from 0.8 seconds to over 1 second. -- Edit bug report at http://bugs.php.net/?id=24362&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24362&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24362&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24362&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24362&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24362&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24362&r=support Expected behavior: http://bugs.php.net/fix.php?id=24362&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24362&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24362&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24362&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24362&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24362&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24362&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24362&r=gnused