NYCPHP Meetup

NYPHP.org

[nycphp-talk] Minimal overhead

Josh McCormack joshmccormack at travelersdiary.com
Sun Sep 2 11:14:54 EDT 2007


You could get around having to have all pages be php by running
through some sort of preprocessos that makes static pages for that
audience, day, hour, etc, and flags which files really need to be
dynamic. Sounds like a lot of work, though.

Josh



On 9/2/07, David Krings <ramons at gmx.net> wrote:
> Elliotte Harold wrote:
> > Suppose I don't want it to be so obvious that I'm using PHP on a site,
> > Or that I just want the freedom to not always use PHP in a given
> > document. Thus I decide to configure Apache to treat all .html files as
> > PHP files.
> >
> > How much overhead does this add for the common case when a file only
> > contains static data, no PHP? Would I notice the hit?
> >
>
> As usual, it depends. All pages will be sent to the PHP interpreter
> which parses the file and decides that there is nothing to do and has
> the web server serve the static content. While there may be no
> noticeable difference when calling one page it may come into play when
> you get several thousand hits a minute.
>
> What's so wrong with calling files .htm and .php and handle them
> differently? Although, I can ask the opposite question and come up with
> some good answers as well. I'd take a look as to how busy the site is
> and how much oomph your server box has. Or just try it out and see what
> happens.
> I came across several instances where I crafted a page as static, but
> then wanted to add a header and then internationalization based on user
> preference. At that point there isn't a way around PHP. Chances are that
> you will use PHP at some point even for pages that are currently static.
>
> David
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>


-- 
Josh McCormack
Owner, InteractiveQA
Web testing & development
http://www.interactiveqa.com
917.620.4902



More information about the talk mailing list