|
Posted by Jerry Stuckle on 07/31/07 13:46
Michael Fesser wrote:
> .oO(Jerry Stuckle)
>
>> Michael Fesser wrote:
>>
>>> Why are you then claiming that calling a script for every page wastes "a
>>> hell of a lot" resources if it doesn't make much of a difference?
>> Because it's completely unnecessary. But you don't seem to understand
>> that part.
>
> I _do_ understand that, I just don't agree that it wastes as much
> resources as you claim.
>
> Additionally I don't care that much at all about some more or less CPU
> cycles (you won't even notice a difference on a properly configured
> machine) because there's a whole bunch of other things that can (and do)
> waste a lot more.
>
That's your opinion. But there are other, more efficient ways to do it.
And if what you say is true, why don't Apache and PHP recommend it?
They don't, though. And they know best.
>>> Like an image-from-db script. If it can be done with static files as
>>> well, then calling the image script is unnecessary. Same thing.
>> But there are other reasons for delivering images from databases.
>
> There are also reasons for not doing that.
>
>> There
>> are no good reasons for parsing every file as PHP.
>
> There are, I already gave some. One reason was to have proper URLs
> without a .php suffix. Of course there are other ways to do that, but
> passing all pages through PHP is one way to achieve that goal and is
> quite easy to setup. This _is_ a reason.
>
No, you haven't given any good reasons for parsing all files as PHP.
What you have done is given the most inefficient way possible to achieve
that goal.
>>>> There are other reasons for
>>>> delivering images from the database.
>>> This isn't part of the discussion.
>> Oh, so now it's not part of the discussion?
>
> No. The reasons why or why not delivering images from a DB is not part
> of this discussion, and actually I don't really want to discuss that.
> But the fact that it wastes resources _is_ part of the discussion.
>
Not at all.
>>> Looking for <?php or <!--#foo in a string is pretty easy. Even the PHP
>>> parser doesn't have much to do in plain HTML.
>> You really need to understand parsers more before you make such claims.
>
> I do.
>
>> Searching for <?php or <!--$foo are not the only things parsers must do.
>
> Sure, but that's where it all begins. No processing instruction, no
> further parsing. Just pass-through.
>
> Micha
Oh, but there are - a huge number of other things going on even before
the parser gets involved - like loading the parser in that process or
thread, setting up the PHP environment, parsing the URL, and so on.
With SSI there is no environment to set up, no URL parsing or a lot of
other things PHP does even before it gets to the point of scanning your
file.
Parsing files for PHP unnecessarily is a waste of a lot of resources.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|