PHP Speed

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
blindchild
Forum Newbie
Posts: 5
Joined: Sat Aug 13, 2005 10:47 pm
Location: London

PHP Speed

Post by blindchild »

Hi,
I was just wondering if there are any factors to take into account to get a php site to work quickly. Im putting myself through the motions just trying to learn php and to experiment with what it can do. But my site seems to be functioning very slowly, the other non-php related pages on my site work fine.
What could be the reason for this and what can I do to combat it?
Thanks
Ross
PS. http://www.blindchild.com/blog is my address. Thanks again.
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

benchmark it.

Most likely, its due to SQL calls, or dns resolution issues. Those two are the biggest slowdowns in php development, imho.

But don't take anyones guess as correct - benchmark portions of the page, and see where the delay is.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

consider using indexes atleast for one column in a table which you think you would use the most.
try some tutorials in phpbuilder.
try to retrieve fields that are necessary.
ex: common mistakes with ppl new to sql
assume Users_tbl has 10 fields in it and dont use select * from Users_tbl instead select col1,col2..coln from Users_tbl
I used to make the same kind of mistakes when I was new to sql :?
Post Reply