Re: Print or Echo takes lots of time

From: Date: Mon, 25 Sep 2006 12:47:01 +0000
Subject: Re: Print or Echo takes lots of time
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-242187@lists.php.net to get a copy of this message
Sancar Saran wrote: > Hi, > > When I was check the performance of my system I found interesting resuts. > > My code stores html output into a variable. When page creation complete I > printed out the variable. > > Problem was generation html code takes 0.5 second and just > echo $strPage takes 2.0 or more second. I read a while ago that it is more efficient to echo as you go rather than store up a large variable with the content in it. You may want to investigate output buffering instead as 9 times in 10 the sames results of using a big variable can be achieved. It does seem odd none the less tho' that it takes so long. Col

« previous php.general (#242187) next »