Hello everyone,

  I've changed the subject to what I think is more relevant.  I've also chopped major 
sections out to simply reply to specifics.  Apologies in advance.

>1) Index the DB. Most 'catalogue' systems are updated relatively

  True and relevant.  "EXPLAIN SELECT..." will show you what indexes if any that are 
being used or examined.  char(x) is better than varchar(x) (i.e. fixed-length index 
fields), even if the db is larger because of it.

>2) MOD_PHP - install PHP as an Apache module instead of running it as a CGI
>process. This should speed you up quite a bit. I am still trying to find a
>good host who runs PHP as an Apache module. Most that I have spoken to only

  Not should, but does, significantly.  Since I'm a reseller, I won't mention names.  
Find a good host, with good tech. support.

>3) Removed unneeded comments. Comments in compiled languages (like C++,

  I have to disagree here, not on technical merits, but on principle.  Yes, PHP will 
have to read the comments (a file read), but is quite able at discarding them.  Better 
parsing from using double-quotes ONLY where necessary will actually be a bigger 
speedup.  You would be surprised at the time difference in parsing "This string" vs. 
'This string' (in an overall system deployment, not just this one string).  The 
difference being no checking for variable substitution.  Personally, I think it works 
well with html also, and easier to read without the escaping of quotes all of the time.

  There is also a speedup in echo vs. print.  Run many iterations over the following 
and test for yourself in your environment (PHP3 or PHP4 doesn't matter although PHP4 
is nice :)

    print "This is $mystring and \"this\" is some html<br>\n";
vs  echo 'This is '. $mystring. ' and "this" is some html<br>'. '\n';
    // why waste the newline character :)

>4) The Language and ScreenInfo files: it seems a waste to read in the whole
>of these files and define a gazillion variables that we probably do not

  Parsing the switch will take longer.  More variables aren't really that big of an 
issue, especially in PHP4.  Although encapsulating them within classes is a GoodIdea 
in my opinion.  It does sound like Leon has done quite a bit of work seperating in v2, 
but I haven't looked at it yet.  I also feel that any further work really should be 
done against the new version - if it ain't broke, don't fix it (to a large extent).

>5) For what it is worth: I changed the layout a bit. I changed the left
>side. As part of this, I took out all the <BR>s and made <TR>s instead. It
>could be my imagination, but I could swear that the screen draws noticeably
>quicker. Any reason for this?

  Rendering table elements really *should* take longer.  I've seen major speedups from 
designing vertically instead of horizontally with tables.  Take a bit getting used to, 
but it works well.  Netscape is a good test case here especially.

>6) Images: always use the height/width tags if possible. If you do, the

  A given regardless of language.

>7) CSS - I think we should keep the Stylesheet file but we should not
>include it in everypage. We should use it as an external stylesheet. We can

  If external it is cached.  Why not include it in every page then?  The few bytes for 
the line to be read?  OS's are quite good at reading files.  I think having one place 
to change the look is another GoodThing.

>thoughts, additions, flames?

  There's my thoughts off the cuff.  You brought up some very good points Michael, 
let's see what falls out of the tree...

John
--
/* SteeleSoft Consulting  John Steele - Systems Analyst/Programmer
 *  We also walk dogs...  [EMAIL PROTECTED] - PHP/MySQL/Linux/Hosting
 *                        http://www.gamecomputer.com/ssc/
 */


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Site:            http://www.working-dogs.com/freetrade/
Problems?:       [EMAIL PROTECTED]

Reply via email to