[phpa] Re: [Fwd: Re: strange thing] (a bit OT?!)

  • From: "Alain Fontaine" <alain@xxxxxxxxxx>
  • To: <nick@xxxxxxxxxxxxxxxxxxxxx>, <zerocool@xxxxxxxxxxxxx>
  • Date: Mon, 10 Jun 2002 20:30:25 +0200

Hello,

You say:

<--
As fas I know, and unless you have
prepend or append files, running a file through PHP that contains no
php at all, and that gets turned into a big echo statement, serves no
purpose at all other than to slow you down.
-->

Yes, and no... if you have zlib_compression turned on in php.ini, for
instance, this is a way to compress static HTML files on the fly if you
can't / don't want to use mod_gzip, for instance.

-----Message d'origine-----
De : phpa-bounce@xxxxxxxxxxxxx [mailto:phpa-bounce@xxxxxxxxxxxxx]De la
part de Nick Lindridge
Envoyé : samedi 8 juin 2002 19:00
À : zerocool@xxxxxxxxxxxxx
Cc : phpa@xxxxxxxxxxxxx
Objet : [phpa] Re: [Fwd: Re: strange thing] (a bit OT?!)




> Just another small question again:
>
> Is it such a bad idea to exclude html-pages from being cached? Most
> PHP-People have some HTML-files on their servers so it may be a good
> idea to cache  them too. A flag "phpa_just_cache_in_shm=*.htm*" would
> be nice to exclude the files from being processed. May be an idea,
when
> shm-buffer is extended over the 32MB limit in future, isn't it?

The bad thing is surely that the html files get run through php in the
first place. Caching them in shm then just uses up shm unnecessarily,
and may not give much, if any, speedup over PHP just reading them. That
said, the file access would be eliminated, but the kernel is likely to
have cached the files in ram anyway if they're frequently used. And, if
they are frequently used, you really want apache to just open the file
and blast it out to the client. As fas I know, and unless you have
prepend or append files, running a file through PHP that contains no
php at all, and that gets turned into a big echo statement, serves no
purpose at all other than to slow you down.

Brings to mind a comment that I vaguely remember being in the first
computer book I ever bought as a kid. The book was on compiler writing
by P.J.Brown, and he recalled a compiler that would, on encountering
more than a tolerable number of errors, give up and output something
like "No program was detected in this file"! That appealed to me at the
time and I think was intended as a dig by the compiler at the quality
of the code that it was just subject to and expected to compile.




------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: