You are here: Re: php server computing « PHP Programming Language « IT news, forums, messages
Re: php server computing

Posted by Bent Stigsen on 11/15/83 11:26

PaowZ wrote:
> Hi there!
>
> I have a question about php server computing...
> Is it more costing in ressource for a server to compute a html page
> based on concatenated html strings than a html page with a few php
> statements ?

The way you state it, the concatenation would take more resources, but
the difference would be insignificant compared to bad structure and
sloppy code.

Mostly you should do what you think is easiest to maintain, fastest to
write or neatest.
If you think or when performance is an issue, then use a benchmark
tool (e.g. Apaches "ab") to test different solutions. And even then,
it is often more sensible to choose a simpler/cleaner yet adequately
efficient solution, before the most efficient solution.

> I wonder that in order to make pages more efficient to compound :)

Being mindful of efficiency is not a bad thing, but IMO you should
forget about tinkering with ideas whether echo is faster than print,
single quotes is faster than double quotes and the likes, unless it
really is borderline critical. You should rather look at how you
structure your program, which parts that is timeconsuming and how
things should be sequenced. It can be a simple thing like writing "if
(quick() && slow())" instead of "if (slow() && quick())".


/Bent

 

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

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