[thelist] php/mysql speed query

Nick Wilson nick at explodingnet.com
Tue Mar 5 05:45:01 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


* and then kris burford [midtempo] declared....
> but is it better to have a large page of php code littered with
> conditional/switch statements (where the output is dependent on which
> section of the site a visitor is in or which options they have made within
> a page) or to split the code into multiple smaller documents. for example,
> i've an include for the navigation which is currently 16k of php code. i
> could easily reduce this so that each section of the site calls a separate,
> smaller, file (at the expense of having one single file to manage).

I'd say keep it all in one file but I'd also say that the difference it
will make is negligible.

Get your pages working in whatever way makes most sense to you.
Keep your program very well commented.
When you've done, if you feel the need, do some benchmarking with the
way you've done it and by splitting up the sections.

The important thing is to get it working first.

> i'm also intending to look at making it cache-friendly, so if anyone has
> any advice as to this as well, i'd be most grateful.

Check out devshed, I'm sure they've an article on that and I think also
Zend.
- --
- -----------------------------------------------------------
 www.explodingnet.com   |    Projects, Forums and
                        +    Articles for website owners
- -- Nick Wilson --     |    and designers.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8hK/THpvrrTa6L5oRAomHAJ9m3/vZS6OFVtX0Zrlz4KFn6WdDfgCfSUQK
cmV0zK/WY/ynPPxzchA4FLo=
=B7IG
-----END PGP SIGNATURE-----



More information about the thelist mailing list