You are here: Re: PHP in html « PHP Programming Language « IT news, forums, messages
Re: PHP in html

Posted by Jerry Stuckle on 07/31/07 09:51

Michael Fesser wrote:
> .oO(Jerry Stuckle)
>
>> Of course, you conveniently ignore the fact those 20 images require 20
>> additional calls to the server, anyway.
>
> Doesn't matter here. 20 requests are 20 requests, but it makes a big
> difference if the server can deliver them statically as-is or if it has
> to invoke a script handler for every single image.
>

Not nearly as much as you claim.

>> The script will already be in
>> memory (if nothing else, the OS cache will have it),
>
> Page-generating scripts can be cached as well, dependent on the
> configuration of the webserver and the PHP interpreter.
>

Sure they can. But they still have to be interpreted unnecessarily.

>> and the overhead of
>> interpreting it isn't very bad at all.
>
> So you want to tell me that a simple page-generating script wastes more
> resources then a script that has to
>
> * open a connection to a database
> * query the DB (requires to analyze and optimize the query)
> * transfer binary data from the DB into the script
> * close the connection
> * transfer the data to the webserver
>
> ?
>

This isn't part of the discussion. There are other reasons for
delivering images from the database.

>> And it beats trying to keep
>> track of thousands (or tens of thousands) of files on the disk.
>
> Doesn't matter here. We were talking about performance and "wasting a
> hell of a lot" resources. If you think interpreting all pages as PHP
> wastes that many resources, but fetching images from the DB does not,
> then there must be something really wrong ...
>

If it doesn't matter, then why did you bring it up?

>> Not nearly as much as PHP.
>
> Depends on the server configuration I would say. SSI requires a parser/
> interpreter as well. And PHP running as a server module is quite fast.
> The work that has to be done by the parsers is quite the same - they
> just look for special directives in the HTML code.
>

You obviously don't understand how it works. The SSI parser is much
smaller and much faster than the PHP parser.

>> But I didn't say I used SSI on all pages,
>> either, did I?
>
> Well, using SSI for a menu indicates that.
>

Sure, but I didn't say it was on every page, either.

>> They say URI's don't change. They don't say to interpret every page as PHP.
>
> Again: This wasn't the point here. We were talking about leaving out
> file extensions from a URL.
>
> Micha

Exactly. They say don't change the URL. They don't say interpret every
page as PHP. There are other ways to do it.

--
==================
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

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