#19516 [Fbk->Opn]: output buffer timing is strange
| From: | f dot labanvoye at cg70 dot fr | Date: | Mon, 14 Oct 2002 13:10:52 +0000 |
| Subject: | #19516 [Fbk->Opn]: output buffer timing is strange | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22367@lists.php.net to get a copy of this message | ||
ID: 19516
User updated by: f.labanvoye@cg70.fr
Reported By: f.labanvoye@cg70.fr
-Status: Feedback
+Status: Open
Bug Type: Output Control
Operating System: Windows 2000 server
PHP Version: 4.2.3
New Comment:
I rerun test with and without zlib_output_compression. there is no
difference.
i don't use ob_gzhandler.
with $max=1000 and output_buffer= 16384, the second loop is slower than
the first. If i increase output_buffer to 32656 , the second loop take
less time than the first ( it's the good result). The size odf output
is 28ko.
I will run test with the php 4.3.0pre1 as soon as possible.
Previous Comments:
------------------------------------------------------------------------
[2002-10-01 05:21:07] yohgaki@php.net
It sounds like you are enabling zlib.output_compression. (If you are
not using ob_gzhandler)
If yes, this is not a bug.
------------------------------------------------------------------------
[2002-10-01 02:44:00] f.labanvoye@cg70.fr
There is no difference with or without \n and in command line.
gzip is disabled for all test.
I think the problem is the rotation of the buffer. timing is good if
the buffer size is greater or equal to the output size.
all works fine on linux
------------------------------------------------------------------------
[2002-09-26 18:28:55] iliaa@php.net
If you add \n to $suite variable does this change the timings in any
signifcant way? Also, check to make sure you do not gzip compression
enabled as well as try doing this test via a command line rather then a
browser.
------------------------------------------------------------------------
[2002-09-20 03:20:11] f.labanvoye@cg70.fr
on Windows 2000 SP2 FR, and php 4.2.3, the outbut buffer seems to not
work correctly.
i make test to see the time taken to output data, and this time is not
linear.
explain, with output buffer = on in php.ini, all works fine. but with
output_buffer=off ou output_buffer = 4096 or 8192 or more, the time for
output data is very strange.
the script:
<?
include "exectimer.class.php";
$tip = new VWT_execTimeProfiler();
$suite = " vs print";
$max = 10000;
$tip->start();
$tip->watch("echo double");
for( $i=0;$i<$max;$i++) {
print "echo $suite";
}
echo "<hr>";
$tip->watch("echo en simple");
for( $j=0;$j<$max;$j++) {
print 'echo '.$suite;
}
$tip->stop();
$tip->show();
?>
the first for loop can take 100 ms to 800 ms when i change the size of
output buffer.
if i increase the loop count, then the time for the second loop
inrease, but the firt loop decrease.
When output_buffer is on, all works fine.
I don't see this bug on Linux.
PS: sorry for my bad english...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19516&edit=1