Re: A question about speed...

by Berk/Devlin <armadill(at)earthlink.net>

 Date:  Thu, 05 Apr 2001 10:46:41 -0700
 To:  hwg-techniques(at)mail.hwg.org
  todo: View Thread, Original
First, thanks to everyone who offered suggestions.

What I decided to do was to put my very first page in html (as index.htm) 
as well as in php (index.php3).  The .htm page ALWAYS loads extremely fast, 
unless it does not load at all
:-{  And, I've been concerned about how search engines interact with php, 
even though my friends on the php lists ASSURE me search engines have no 
problem with php, unless I pass variables to it, which I often do.  So 
having the HTML version there can't hurt, right?

I am reluctant to hammer on my ISP too hard.  In general they've been 
responsive to my technical issues and newbie questions.  And, from what you 
guys are telling me, my pages are loading pretty fast.  (I chose this ISP 
because THEIR pages load faster than most ISP's pages and they support 
nearly every server language I've ever been interested in.)

But I will play with pinging and routing and other investigations to try to 
identify what exactly is slowing response time down.  So, thanks for all 
those suggestions as well.

I wanted to respond to Tamara Nelson's intelligent suggestion (which I had 
acted upon before I received it...)

On Tue, 3 Apr 2001 21:58:43 -0400,  "Tamara Nelson" <tamara(at)sanctusmoo.com> 
suggested:
>Hi all...I'm new here so forgive me if my  first post is actually a quote
>from a book...
>
>"... The web server needs to do additional processing when
>interpreting PHP, so its actually more efficient for the server to serve
>static HTML rather than process PHP. " (Essential PHP for Web Professionals)
>
>Maybe your page would load quicker if you used static HTML instead?
>Tam

So true, Tam.  Here's an explanation, although it sounds like you really 
don't need it:

    In fact, what PHP is is a language designed for generating HTML pages.
    What it does in my .php3 and .php pages is to CREATE HTML tags and 
place them
    into HTML pages.

    My PHP source files look something like this:

                PHP commands that write HTML headers and Javascript;
                A bunch of straight HTML;
               PHP commands that write HTML and Javascript into the page body;
               A bunch of straight HTML and Javascript
     ... etc.

     Obviously, it takes TIME for my ISP's server to translate these PHP 
commands into
     HTML.  And I am ok with sacrificing, say 1 or 2 seconds for that 
translation.  But not 20
     seconds.  And obviously the server is capable of doing the translation 
in 1 or 2 seconds,
     because sometimes it DOES the translation in that amount of time.

     After they arrive at your browser if you view the source of my
     http://www.armadillosoft.com/index.php3 page in your browser, you see
     ONLY HTML.

So, anyway I have two options:

1.  I can write everything in PHP, use the PHP processor to translate some 
or all of it into HTML and then save the files as HTML on my Web 
site.  (This means there is no delay while the PHP translation occurs, but 
I have to remember to save the source.)  This will make my pages load at 
least a little faster every time but it's an extra step for me, but if I 
forget to do this, then my page updates get lost, and it doesn't prove to 
the world that I am using php.

or,

2.  I can write everything in PHP, and leave it all in PHP.  That means 
that every page loads a little slower.  This is ok with me in most 
cases.  But there are some times of day when the PHP pre-processing  seems 
to be taking 20 seconds or more, and that is ridiculous for pages that I've 
worked really hard to make small and fast, but it's probably because of 
increased load on the ISP's server.

So, what I've decided to do is create my own server, install my favorite 
tools on it, and maybe, in the future, I will be more in control of my own 
destiny.  Anyone have a favorite piece of server hardware?  I'm considering 
an IBM xSeries 200 P3/800 with Caldera OpenLinux.  And, a LinkSys switch 
that can handle about 10 computers.  Since I am a hands-on type of gal, I'm 
planning to just insert the installation CDs and see how that 
goes.  Opinions, experiences, anyone?  Feel free to respond to me directly, 
as this is very probably off topic and I get the digest anyway.  If there's 
interest, I'm happy to summarize for the list.

--Emily


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~                            Emily Berk                                 ~
On the web at www.armadillosoft.com *** Armadillo Associates, Inc.      ~
~             Project management, developer relations and               ~
extremely-technical technical documentation that developers find useful.~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA