You are here: Re: How to remove blanks at runtime?? « PHP Programming Language « IT news, forums, messages
Re: How to remove blanks at runtime??

Posted by Jerry Stuckle on 10/10/06 02:17

Hermann.Richter@gmail.com wrote:
> On Oct 9, 9:21 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
>>Peter Fox wrote:
>>
>>>Following on from 's message. . .
>>
>>>>Thanks.
>>
>>>>Is there any performance impact or server overloading if I use output
>>>>buffering??
>>
>>>>Does it take more resources (cpu, ram)??
>>
>>>No there is absolutely no overhead when buffering and processing the
>>>buffer. Why should that be? It's not as if you're using RAM or CPU
>>>cycles.
>>
>>>If you're generating the output dynamically then clear out those spaces
>>>in the source code.
>>
>>>If you are just serving HTML then tidy up the original HTML once.Actually, there is a slight performance hit, but it isn't much.
>>
>>PHP will by default buffer the output, But this is not a huge buffer(I
>>forget the size),and when it fills, the output is sent to the web server.
>>
>>If you use output buffering, all the output is buffered until you send
>>the data on. This will generally require more RAM for the larger
>>buffer, and more CPU cycles to process the buffer.
>>
>>But it's not a great amount unless you have large pages.
>>
>
> My pages are not too big. But I'm expecting to receive a lot amount of
> visits so I'm very concerned about performance because a slight
> overhead in processing a page could have a big impact on the server
> when serving hundreds of requests per second.
>
> What do you think??
> Could there be a noticeable impact in server's performance on a very
> visited site??
>
> Thank you all for your replies.
>

(Top posting fixed)

Yes, it can affect performance. The reason being that if you don't use
output buffering, PHP can send data to the web server (and onto the
client) while the page is being built. As soon as a buffer gets full,
PHP sends it to the web server; the web server may send it immediately
or buffer it further, but eventually it will send it to the client.

Using the output buffering functions means PHP will have to buffer
everything, then later send everything to the web server at once. Then
the web server sends it to the client.

So not only does this take more memory, it slows things down because PHP
and the web server cannot pick the most opportune times to pass the data on.

With all of that - normally it's not a significant delay, however.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация