Re: Re: optimilize web page loading

From: Date: Thu, 27 Mar 2008 09:11:52 +0000
Subject: Re: Re: optimilize web page loading
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-272154@lists.php.net to get a copy of this message
On Thu, Mar 27, 2008 at 7:28 AM, Al <news@ridersite.org> wrote: > Depends on the server and it's load. I've strung together some rather > large html strings and they > aways take far less time than the transient time on the internet. I used > to use OB extensively until > one day I took the time to measure the difference. I don't recall the > numbers; but, I do recall it > was not worth the slight extra trouble to use OB. > > Now, I simple assemble by html strings with $report .= "foo"; And then > echo $report at the end. It > also makes the code very easy to read and follow. > > Andrew Ballard wrote: > > On Wed, Mar 26, 2008 at 1:18 PM, Al <news@ridersite.org> wrote: > >> You are really asking an HTML question, if you think about it. > >> > >> At the PHP level, either use output buffering or assemble all your > html string as a variable and > >> then echo it. The goal is to compress the string into the minimum > number of packets. > > > > Yes, but do so smartly. Excessive string concatenation can slow things > > down as well. On most pages you probably won't notice much difference, > > but I have seen instances where the difference was painfully obvious. > > > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > I am also doing the same way. assemble the string and echo it at the end

« previous php.general (#272154) next »