Re: [PHP] Re: optimilize web page loading
- From: robert@xxxxxxxxxxxxx (Robert Cummings)
- Date: Fri, 28 Mar 2008 08:58:47 -0400
On Fri, 2008-03-28 at 09:14 +0100, Zoltán Németh wrote:
2008. 03. 27, csütörtök keltezéssel 09.29-kor Philip Thompson ezt írta:
On Mar 26, 2008, at 6:28 PM, Al 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.
You might as well take it a step further. Change the above to:
$report .= 'foo';
This way for literal strings, the PHP parser doesn't have to evaluate
this string to determine if anything needs to be translated (e.g.,
$report .= "I like to $foo"). A minimal speedup, but nonetheless...
that above statement is simply not true. parsing "foo" and 'foo' is all
the same
a good read about it:
http://blog.libssh2.org/index.php?/archives/28-How-long-is-a-piece-of-string.html
Nope, parsing is not the same, the resultant bytecode is the same, but
parsing is not.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
.
- References:
- optimilize web page loading
- From: "Alain Roger"
- Re: optimilize web page loading
- From: Al
- Re: [PHP] Re: optimilize web page loading
- From: "Andrew Ballard"
- Re: [PHP] Re: optimilize web page loading
- From: Al
- Re: [PHP] Re: optimilize web page loading
- From: Philip Thompson
- Re: [PHP] Re: optimilize web page loading
- From: Zoltán Németh
- optimilize web page loading
- Prev by Date: Re: putting variables in a variable
- Next by Date: Re: [PHP] Re: optimilize web page loading
- Previous by thread: Re: [PHP] Re: optimilize web page loading
- Next by thread: Re: [PHP] Re: optimilize web page loading
- Index(es):