Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 136,049 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,564 people online right now. Registration is fast and FREE... Join Now!




Speed Tips

 
Reply to this topicStart new topic

Speed Tips

MathewS
12 Nov, 2002 - 05:16 PM
Post #1

D.I.C Regular
***

Joined: 14 May, 2002
Posts: 252



Thanked: 1 times
Dream Kudos: 1
My Contributions
Could some people give me tips on how i could possibly keep the speed of my pages resonable?
Thanks for any help you can give me.
User is offlineProfile CardPM
+Quote Post

arniie
RE: Speed Tips
13 Nov, 2002 - 01:23 AM
Post #2

D.I.C Addict
****

Joined: 8 Oct, 2002
Posts: 999

I think you'll probably know every thing i'm going to say.. but just in case..

keep images sizes down - use good compression techniques/formats
keep flash/dynamic content sizes down
perhaps have splash screen (but most people hate them) with choice html or flash
use efficient code

erm.... probably more...
User is offlineProfile CardPM
+Quote Post

MathewS
RE: Speed Tips
13 Nov, 2002 - 06:53 AM
Post #3

D.I.C Regular
***

Joined: 14 May, 2002
Posts: 252



Thanked: 1 times
Dream Kudos: 1
My Contributions
is it best to keep the sizes of my php includes to a minimum? Will it slow down the pages if it is to big?
User is offlineProfile CardPM
+Quote Post

Spider
RE: Speed Tips
13 Nov, 2002 - 07:32 AM
Post #4

Arachnid
****

Joined: 10 Jul, 2002
Posts: 769


My Contributions
the php side of things depends on the server more than the users computer.

all php is executed server side before the user gets anything back (but you already knew that...) so as long as your php code is effecient and the server your site is running on is good, the php side of things shouldn't matter a great deal, just the output.
User is offlineProfile CardPM
+Quote Post

MathewS
RE: Speed Tips
13 Nov, 2002 - 08:59 AM
Post #5

D.I.C Regular
***

Joined: 14 May, 2002
Posts: 252



Thanked: 1 times
Dream Kudos: 1
My Contributions
The way i have my site setup is like this

first i include all the site information which does not change on every page call.
i.e. database information.

then i include a file, to check user information.
i.e. Check to see if user is logged in, and do a database call to get the users info.

the next thing i include is the main function files which holds all the functions i use on the site.
(Maybe i could make this smaller so i dont include what i dont need?)

the last include is just check basic information and records hits ect.

after that its just basic call to the functions on each page a use. as well as including the template file for the design of the page.
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Speed Tips
13 Nov, 2002 - 01:42 PM
Post #6

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

Those shouldn't be a problem.

Things that slow down dynamic pages:
- jumping in and out between php and html
- excessive amounts of database queries
- retrieving more info from the db than you need
- inefficient code

Just try to keep your code clean and straightforward, and you should be ok. Included files help a lot because they can cache (depending on what's in them). Reusing functions and subroutines also helps a lot.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 05:36PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month