I need some help to figure out a situation with a webserver regarding execution time. I've noticed a problem when the server returns a higher number of characters than ~41000 - around 40KB.
So I did a script:
<?php
$php_start_time = MICROTIME(TRUE);
echo $_GET['i'].':';
for($i=0;$i<=$_GET['i'];$i++) { echo 'a'; }
echo '<br>runtime: '.(MICROTIME(TRUE) - $php_start_time);
?>
And I try it out, more than 10 times each, multiple browsers:
when $_GET['i']=40952 I get around 0.013...ms
when $_GET['i']=40953 I get around 0.679...ms
a difference of 0.666 for just one single char?
I saw the runtime differs a lot when trying to get the page results from different locations (online proxy).
So I suppose it has to do with distances. I'm in EU, the server is in US.
Until I find a way to fix this issue the script is available at: http://selfreveal.com/speed_test_1.php?i=40953
Also a phpinfo(): http://selfreveal.com/phpinfo.php