FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Using a single php entry file for a whole site.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Using a single php entry file for a whole site. [message #181889 is a reply to message #181878] Fri, 21 June 2013 06:45 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
On 20/06/13 23:50, Christoph Michael Becker wrote:
> Am 21.06.2013 00:33, schrieb Marc van Lieshout:
>> Why is using ob_start() poor programming?
>> The pair ob_start/ob_get_clean captures the contents of the page in the
>> $contents variable.
> This discussion may well end in a flame war. What is faster: echoing
> with output buffering vs. concatening strings with the dot operator?
>
> ISTM all depends on the implementation. AFAIK string concatenation is a
> very cheap operation in Python, for instance, as the string is not
> actually built (merely a "pseudo" string containing links to the
> concatenated strings). In other languages such as PHP, the characters
> have to be copied over to a new string, AFAIK. This probably makes
> output buffering faster, but the performance difference may be
> neglectable for typical cases. And one never knows, if the
> implementation might change in the future.
>
And the killer point, it is in terms of the overall site, the least of
ones worries.

By far and away the biggest performance killer is accessing and
streaming large objects. Generally graphics and videos.

or downloading massive JavaScript includes.

I've got one site which auto refreshes a page, I expected it to be
massively hungry as its pretty popular, but somehow if the images
haven't changed or the page hasn't changed it manages to only send the
bits that have changed.

That has implications for sites that have a common 'frame' around them.
do you explicitly use an Iframe for the bit that moves (or a frame) or
rely on browser caching to not send the bits they have already?


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to lead are elected by the least capable of producing, and where the members of society least likely to sustain themselves or succeed, are rewarded with goods and services paid for by the confiscated wealth of a diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Updating old PHP code
Next Topic: Komodo Edit
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 01:56:35 GMT 2024

Total time taken to generate the page: 0.05030 seconds