echo performance issue
Posted: Sat Jan 18, 2003 9:06 am
Alright, I have tried many tests on my page to find out why this page was generating in around 1.1 sec. I narraowed it down to this one call thats made on a function that echo's a template for a "monster" on my site. Let me give you a little info about my site. I play a game called Ragnarok Online and the whole purpose of this game is to distroy monsters and get higher levels [Diablo Type Game]. Now each monster has it's own specific stats like hp atk def etc ... but there is around 19 diferent stats. Quering them from the database takes about 3E-005, but what takes up the most time is executing this one echo.
http://newspecies.homeip.net/Geffen/Ind ... ry=monster
is a fairly large echo, but I don't see why it would echo in .45 sec [first] and around .18 [anytime else]. If you have any idea please postecho '<table width="500" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td><img src="Images/GUI/Monster/Monster_Top_Left.gif" width="3" height="16" alt=""></td><td width="494" height="16" class="Monster_Top_Center"><img src="Images/GUI/Monster/Monster_Spacer.gif" width="494" height="16" alt=""></td><td width="3" height="16"><img src="Images/GUI/Monster/Monster_Top_Right.gif" width="3" height="16" alt=""></td></tr><tr><td class="Monster_Mid_Left"> </td><td><table width="494" border="0" cellspacing="0" cellpadding="0"><tr bgcolor="E5E5E5"><td width="194" align="center">' . $font . '<b>Name</b>: ' . $display_name . $font_end . '</td><td width="150" valign="top">' . $font . '<b>Level</b>: ' . $display_level . $font_end . '</td><td width="150" valign="top">' . $font . '<b>Aggressive</b>: ' . $display_aggressive . $font_end . '</td></tr><tr><td width="194" rowspan="7" align="center" valign="middle" bgcolor="EEEEEE"><img src="' . $display_pic . '" alt=""></td><td width="150" valign="top" bgcolor="EEEEEE">' . $font . '<b>Def</b>: ' . $display_def . $font_end . '</td><td valign="top" bgcolor="EEEEEE">' . $font . '<b>Looter</b>: ' . $display_looter . $font_end . '</td></tr><tr><td width="150" valign="top" bgcolor="E5E5E5">' . $font . '<b>MDef</b>: ' . $display_mdef . $font_end . '</td><td valign="top" bgcolor="E5E5E5">' . $font . '<b>Supporter</b>: ' . $display_supporter . $font_end . '<td></tr><tr><td width="150" valign="top" bgcolor="EEEEEE">' . $font . '<b>HP</b>: ' . $display_hp . $font_end . '</td><td valign="top" bgcolor="EEEEEE">' . $font . '<b>Cast Detect</b>: ' . $display_castdetect . $font_end . '</td></tr><tr><td width="150" valign="top" bgcolor="E5E5E5">' . $font . '<b>Atk</b>: ' . $display_atk . $font_end . '</td><td valign="top" bgcolor="E5E5E5">' . $font . '<b>Element</b>: ' . $display_element . $font_end . '</td></tr><tr><td width="150" valign="top" bgcolor="EEEEEE">' . $font . '<b>Base Exp</b>: ' . $display_base . $font_end . '</td><td valign="top" bgcolor="EEEEEE">' . $font . '<b>Type</b>: ' . $display_type . $font_end . '</td></tr><tr><td width="150" valign="top" bgcolor="E5E5E5">' . $font . '<b>Job Exp</b>: ' . $display_job . $font_end . '</td><td valign="top" bgcolor="E5E5E5">' . $font . '<b>Size</b>: ' . $display_size . $font_end . '</td></tr><tr><td colspan="2" valign="top"><table width="300" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="EEEEEE">' . $font . '<b>Drops</b>: ' . $display_drops . $font_end . '</td></tr><tr><td bgcolor="EEEEEE">' . $font . '<b>Locations</b>: ' . $display_location . $font_end . '</td></tr></table></td></tr><tr bgcolor="E5E5E5"><td colspan="3" valign="top">' . $font . '<b>Card</b>: ' . $display_card . $font_end . '</td></tr></table></td><td class="Monster_Mid_Right"> </td></tr><tr><td width="3" height="16"><img src="Images/GUI/Monster/Monster_Bot_Left.gif" width="3" height="16" alt=""></td><td width="494" height="16" class="Monster_Bot_Center"><img src="Images/GUI/Monster/Monster_Spacer.gif" width="494" height="16" alt=""></td><td width="3" height="16"><img src="Images/GUI/Monster/Monster_Bot_Right.gif" width="3" height="16" alt=""></td></tr></table><br>';
http://newspecies.homeip.net/Geffen/Ind ... ry=monster