Jump to content

Slow Code??


Relevancy

Recommended Posts

Well, considering the fact that we can't see php without you posting it we would simply be guessing. My guess. Flash. Its always pretty slow to load to the client.

 

PS: I didn't even click your link.

Link to comment
Share on other sites

Here is the index php code.  Let me know if you need the additional files that load in the mess.  Basically the problem is that I handle the marketing and some web/graphical work and we outsourced some programming for a new design and they are saying this is pretty much as fast as it gets for the site?!?!? 

 

<?php
require_once("include/config.php");
require_once("include/common.inc");

require_once(_WWWROOT."/common/lib/header.php");
//require_once("common/lib/header.php");

require_once("include/BLGetWeather.php");
?>
<TABLE cellSpacing=0 cellPadding=0 width=780 border=0 align="center">
<TR><TD bgColor=#ffffff height=10></TD></TR>
<TR>
<TD style="PADDING-RIGHT: 1px" bgColor=#ffffff height=25>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TR><TD align=right height=25><? require_once("common/lib/topTextLink.php"); ?></TD></TR>	
</TABLE>
</TD>
</TR>
<TR>
<TD align="center" bgColor=#ffffff>
<TABLE cellSpacing=0 cellPadding=0 width=763 border=0>
<TR><td><? require_once("common/lib/dropDownMenu.php");?></TD></TR>
<TR><td><? require_once("common/lib/headerPhotoGraph.php");?></TD></TR>
<TR bgColor=#ffffff>
	<TD height=20>
	<TABLE cellSpacing=0 cellPadding=0 width=763 border=0>
	<TR>
		<TD>
		<TABLE cellSpacing=0 cellPadding=0 width=761 border=0>
		<TR bgColor=#d6e8f5>
			<TD height=24>
			<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
			<TR bgColor=#ffffff><TD align=left width=762 height=11></TD></TR>
			<TR  bgColor=#ffffff>
				<TD height=20>
				<table cellspacing=0 cellpadding=0 width="100%" border=0>
				<tr>
					<td valign=top  width="72%">
					<? require_once("common/lib/discoverHawii.php");?>
					<? require_once("common/lib/islandPreview.php"); ?>
					</td>
					<td valign=top align=right width="28%"></td>
					<td valign=top align=right width="28%">
					<? require_once("common/lib/searchform.php");?>
					<? require_once("common/lib/freeNewLetter.php");?>
					</td>
				</tr>
				</table>
				</TD>
			</TR>
			</TABLE>
			</TD>
		</TR>
		</TABLE>
		</TD>
	</TR>
	</TABLE>
	</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD bgColor=#ffffff>
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tr>
	<td colspan=4 height=22><? require_once("common/lib/specificTypeVacation.php");?></td>
</tr>
<tr>
	<td colspan=4 height=22><? require_once("common/lib/blueFooter.php");?></td>
</tr>
<tr>
	<td colspan=3><? require_once("common/lib/whiteFooter.php");?></td>
</tr>
</table>
</TD>
</TR>
</TABLE>
</CENTER>
<div id="time" style="height:40px; width:88px; position:absolute; top:450px; background-image:url(images/time_border.gif); z-index:1;  padding-top:6px; background-repeat:no-repeat;" align="center">
<font class="text" style="color:#8D8D71; font-weight:bolder;">Hawaii Time <br>
<iframe src="http://free.timeanddate.com/clock/ihdhs77/n103/fn17/fs11/fc8d8d71/ftb/ts1" frameborder="0" width="49" height="18"></iframe>
</font>
</div>
<div id="time1" style="height:40px; width:88px; position:absolute; top:450px; z-index:10;  padding-top:6px;">
<img src="images/spacer.gif" height="40" width="88">
</div>
<script language="JavaScript" type="text/javascript">
function make_visible(passval)
{
mainpos = 330; // Distance between table start and div tag
oH = document.body.clientHeight; 
oW = document.body.clientWidth; 

if(oW > '780'){
	addval = (oW - 780)/2;
} else {
	addval = 0;
}
mainpos = mainpos + addval;
document.getElementById(passval).style.left = mainpos + 'px';
}
make_visible("time");
make_visible("time1");

window.onresize = make_hide_all;

function make_hide_all()
{	
make_visible("time");
make_visible("time1");
}
</script>

<script src=http://www.google-analytics.com/urchin.js type="text/javascript"></script>

<script type="text/javascript">
_uacct = "UA-31326-1";
urchinTracker();
</script>
</BODY>

Link to comment
Share on other sites

I viewed the total amount of javascript that is being run on that page, and it alone is HUGE. You need to trim it down. I'm on a fiber connection (5down/2up), so if it's slow for me, and it is, it just means you have too much stuff loading.

 

Documents (4 files) 115 kb

http://www.greathawaiivacations.com/ 88 kb

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/ipopeng.htm 23 kb

http://free.timeanddate.com/clock/ihdhs77/n103/fn17/fs11/fc8d8d71/ftb/ts1 3 kb

http://www.greathawaiivacations.com/mp3player.php 524 bytes

Images (64 files) 142 kb

http://www.greathawaiivacations.com/images/logo.jpg 24 kb

http://www.greathawaiivacations.com/images/why_choose.gif 19 kb

http://www.greathawaiivacations.com/images/backpic.jpg 7 kb

http://www.greathawaiivacations.com/images/instant-quote-bar.gif 6 kb

http://www.greathawaiivacations.com/images/temp_pic.jpg 6 kb

http://www.greathawaiivacations.com/hawaii/thumb/14918_6__molokai_thumb.jpg 4 kb

http://www.greathawaiivacations.com/images/gulabo.gif 4 kb

http://www.greathawaiivacations.com/images/avcd_search_glass.gif 4 kb

http://www.greathawaiivacations.com/images/show_result.gif 4 kb

http://www.greathawaiivacations.com/hawaii/thumb/14917_3__hawaii_thumb.jpg 3 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_07.gif 3 kb

http://www.greathawaiivacations.com/hawaii/thumb/14932_2__14921_2__oahu_thumb.jpg 3 kb

http://www.greathawaiivacations.com/hawaii/thumb/14920_4__kauai_thumb.jpg 3 kb

http://www.greathawaiivacations.com/hawaii/thumb/14919_5__lanai_thumb.jpg 3 kb

http://www.greathawaiivacations.com/images/Molokai-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/Big-Island-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/Kauai-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/Lanai-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/Oahu-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/freenewsletter.jpg 2 kb

http://www.greathawaiivacations.com/images/Maui-Vacations.gif 2 kb

http://www.greathawaiivacations.com/images/Cruises.gif 2 kb

http://www.greathawaiivacations.com/images/Home.gif 2 kb

http://www.greathawaiivacations.com/images/Air-Packages.gif 2 kb

http://www.greathawaiivacations.com/hawaii/thumb/14403_1__maui.jpg 2 kb

http://www.greathawaiivacations.com/images/explore.jpg 2 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_02.gif 2 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_08.gif 2 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_12.gif 2 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_09.gif 1 kb

http://www.greathawaiivacations.com/images/ad_barold.gif 1 kb

http://www.greathawaiivacations.com/images/ghv_searchbar_06.gif 1 kb

http://www.greathawaiivacations.com/images/mycls.jpg 1 kb

http://www.greathawaiivacations.com/images/tempsign.jpg 736 bytes

http://www.greathawaiivacations.com/images/button.gif 715 bytes

http://www.greathawaiivacations.com/images/squares.gif 695 bytes

http://www.greathawaiivacations.com/images/ghv_searchbar_03.gif 635 bytes

http://www.greathawaiivacations.com/images/ghv_searchbar_13.gif 599 bytes

http://www.greathawaiivacations.com/images/ghv_searchbar_01.gif 598 bytes

http://www.greathawaiivacations.com/images/ghv_searchbar_11.gif 572 bytes

http://www.greathawaiivacations.com/images/diag.jpg 566 bytes

http://www.greathawaiivacations.com/images/time_border.gif 497 bytes

http://www.greathawaiivacations.com/images/grey001.jpg 389 bytes

http://www.greathawaiivacations.com/images/boxbgtop-1.jpg 357 bytes

http://www.greathawaiivacations.com/images/boxbgtop.jpg 349 bytes

http://www.greathawaiivacations.com/images/bar_bg1.jpg 311 bytes

http://www.greathawaiivacations.com/images/wb_img.jpg 305 bytes

http://www.greathawaiivacations.com/images/wt_img.jpg 305 bytes

http://www.greathawaiivacations.com/images/grey002.jpg 304 bytes

http://www.greathawaiivacations.com/images/thum_box_06.gif 273 bytes

http://www.greathawaiivacations.com/images/thum_box_02.gif 267 bytes

http://www.greathawaiivacations.com/images/thum_box_08.gif 267 bytes

http://www.greathawaiivacations.com/images/thum_box_04.gif 265 bytes

http://www.greathawaiivacations.com/images/thum_box_09.gif 205 bytes

http://www.greathawaiivacations.com/images/thum_box_03.gif 204 bytes

http://www.greathawaiivacations.com/images/thum_box_01.gif 198 bytes

http://www.greathawaiivacations.com/images/thum_box_07.gif 198 bytes

http://www.greathawaiivacations.com/images/ghv_searchbar_14.gif 181 bytes

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/arrowl.gif 128 bytes

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/arrowr.gif 128 bytes

http://www.greathawaiivacations.com/images/lowernav_01.gif 110 bytes

http://www.greathawaiivacations.com/images/lowernav_03.gif 109 bytes

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/calDropArrow1.gif 73 bytes

http://www.greathawaiivacations.com/images/spacer.gif 45 bytes

Objects (3 files) 240 kb

http://www.greathawaiivacations.com/media/header.swf 231 kb

http://www.greathawaiivacations.com/media/testimonials.swf 10 kb

music/playerSingle.swf

Scripts (10 files) 86 kb (100 kb uncompressed)

http://www.greathawaiivacations.com/common/js/mm_menu.js 29 kb

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/plugins.js?0 16 kb

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/contrast.js?0 9 kb

http://www.greathawaiivacations.com/music/swfobject.js 7 kb

http://www.greathawaiivacations.com/js/validation.js 6 kb

http://www.google-analytics.com/urchin.js 6 kb (20 kb uncompressed)

http://www.greathawaiivacations.com/common/js/ajax_letter.js 4 kb

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/agenda.js?1182827466421 4 kb

http://www.greathawaiivacations.com/common/js/pop_up.js 2 kb

http://www.greathawaiivacations.com/common/js/homeflash.js 2 kb

Style Sheets (2 files) 19 kb

http://www.greathawaiivacations.com/style/hawaii.css 16 kb

http://www.greathawaiivacations.com/common/js/calendar/demos/DateRange/contrast.css?0 3 kb

Total 602 kb (616 kb uncompressed)

 

You should really try to limit the total size to 100kb or less.

Link to comment
Share on other sites

you could get rid of a third of the download time by getting rid of the flash, and yes downloading javascript from an outside source could definately slow you down. Images account for 142kb of the page, which is too much. You need to either optimize the images, or reduce the number of images on the page (or if the style sheet for this page calls for images that aren't used, make a seperate style sheet for the home page so that the other images don't get downloaded). Try dividing the page content , and putting some of it on other pages. Remember, if somebody who has dial-up internet access comes to your site, they will almost assuredly hit the back button within 10 seconds if the page hasn't loaded, and yours would be more like 5 minutes. Don't think they aren't still out there. Many of the wealthier folks in CA where I live own houses out in the "country", and don't have DSL, cable, or fiber network service. Your site is about vacations, and these are the people who are taking them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.