Reply to Re: PHP in html

Your name:

Reply:


Posted by Michael Fesser on 07/31/07 09:01

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

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

>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

?

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

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

>But I didn't say I used SSI on all pages,
>either, did I?

Well, using SSI for a menu indicates that.

>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

[Back to original 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

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