View Single Post
Old 2003-11-08, 10:42 PM   #19
RawAlex
Took the hint.
 
Join Date: Mar 2003
Posts: 5,597
Send a message via AIM to RawAlex
Jim, today it seems okay, some slowdowns and such, nothing really specific, although I have a feeling that there are two issues at work here:

The banner rotator for the 7 banners on the page is a little slow. I am thinking that you are calling 7 seperate instances of it, rather than calling it once to do all the work. Not sure of the solution here, but it seems to be an issue from what I can see. Are you using mysql_pconnect?

Also, you might want to look at the page structure to make sure you are not doing too much as "tables in tables"... make the top section with the banners and such one piece, make the center one piece, and make the bottom a piece. After each section, have php do a flush command to force it to send the block so far, which will help that part appear on the screen faster.

Finally, look at things that are done dynamically that can be done hard coded, such as lists of smilies... Maybe have the first 30 be a predone piece of code, so you don't have to open a database to get them, as it doesn't change that often. Run a new code insert when you add new ones.

Oh yeah... check closely to make sure that database items that are being sorted on are INDEXED. It is often the single most forgotten part of DB developement. If you are sorting things by username, make sure that username in that table is indexed. That will make it MUCH faster, as the machine won't have to do a sort each time it is accessed, only when something is added or removed.

Alex
RawAlex is offline   Reply With Quote