Problem with echo/printf
| From: | J-F Mammet | Date: | Wed, 03 Nov 1999 09:20:19 +0000 |
| Subject: | Problem with echo/printf | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-5854@lists.php.net to get a copy of this message | ||
Hi all.
I'm using the latest CVS version of PHP4/zend to develop my new site. However I have a big performance problem.
My template system gets all the non parsed templates from the database, parses them and put the result in a string. For testing this string is 63 kbytes big. Until now everything is ok and for a rather complex page it takes .25 seconds to get the final string, which is good.
Now comes the strange part. All I want to do is send the string to the customer browser. When I do it locally (same machine) with a wget, the final page is completed totally in .25 seconds. Good. However if I do a wget from a machine on the same network, it takes 3 seconds !!!
All I do is :
echo $Templates["Contenu_Nom"]["main"];
A printf takes about the same time.
If I do :
for ($i=0;$i<strlen($Templates["Contenu_Nom"]["main"]);$i++)
echo $Templates["Contenu_Nom"]["main"][$i];
The page is generated in 1.4 seconds, locally or not, which I believe is normal since this loop is ugly 8-p
I did not file a bug report because it may be a bad configuration on my side but I don't remember having this king of problem with PHP3.
Any idea ?
Best Regards.
J-F Mammet
webmaster@softgallery.fr