Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Is my site slow?


myideal

Recommended Posts

Mark,

 

It ran fast enough for me but I'm on a fast connection at the moment. One thing you can do is use one of the image contribs. I noticed that you are using the same image for the product listing and the Click to Enlarge version. While the image is scaled down small on the product listing, it is a full size (76 KB on the one I checked) image that is downloaded.

 

There is a current thread discussing speed optimization here. There's at least 1 contrib that has resulted from it.

 

ed

Link to comment
Share on other sites

Hi,

 

Something that has been buging me - is my website loading speed slow? Any feedback would be great.

 

www.my-ideal.com

 

Also is there anything I can do to speed up the sites download speed?

 

Regards,

 

Mark

 

Look in the tips section of the forum there are a few threads about speeding up your site. One thing you might want to take a look at is one of the thumbnail contributions as some of your images seem a bit heavy. I like the thumbnail on the fly as it keeps me from having to upload seperate picts but sometimes you have to play with your images a bit for them to show up correctly.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Thanks for your help - I cant believe how slow my site is on a 56k connection.

 

I have just looked at the "thumbnails on the fly contribution" however it looks quite complex. Is this the case, I was just looking at the changes needed to be made to the /includes/html file - I wasnt sure where the code should actually go in this file.

 

Thanks once again for you help.

Link to comment
Share on other sites

Thanks for your help - I cant believe how slow my site is on a 56k connection.

 

I have just looked at the "thumbnails on the fly contribution" however it looks quite complex. Is this the case, I was just looking at the changes needed to be made to the /includes/html file - I wasnt sure where the code should actually go in this file.

 

Thanks once again for you help.

 

The file is the includes/functions/html_output.php file and the code you are looking to replace starts at or about line 73

 

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {

if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

return false;

}

 

// alt is added to the img tag even if it is null to prevent browsers from outputting

// the image filename as default

$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

 

if (tep_not_null($alt)) {

$image .= ' title=" ' . tep_output_string($alt) . ' "';

}

 

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {

if ($image_size = @getimagesize($src)) {

if (empty($width) && tep_not_null($height)) {

$ratio = $height / $image_size[1];

$width = $image_size[0] * $ratio;

} elseif (tep_not_null($width) && empty($height)) {

$ratio = $width / $image_size[0];

$height = $image_size[1] * $ratio;

} elseif (empty($width) && empty($height)) {

$width = $image_size[0];

$height = $image_size[1];

}

} elseif (IMAGE_REQUIRED == 'false') {

return false;

}

}

 

if (tep_not_null($width) && tep_not_null($height)) {

$image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';

}

 

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

 

$image .= '>';

 

return $image;

}

 

 

Remember always backup your file first. Also make sure you set all your images settings in the admin per the readme.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Thanks for that web spped link - I've been using cable, and was oblivious to the fact that it takes ~28.3 seconds to load my front page over 56k! I made a simple modification that brought this straight down to ~15.87 seconds. More work is needed, but this thumbnail change could be made into a contribution I guess.

 

Basically, I created a new directory called "products" under catalog/images/, and copied all of my full size product images there. I then used IrfanView (shareware tool) to batch create 120 pixel width thumbnails for every product image I had. This was about 100 files, and the resulting space used is less than 3kb per thumbnail, so the additional disk usage on the server is minimal. I then overwrote the existing product images in images/ with the new thumbnails. I then made the following two code changes:

 

configure.php - ADDED the following line:

 

define('DIR_WS_IMAGES_PRODUCTS', DIR_WS_IMAGES . 'products/');

 

popup_image.php - CHANGED the following line:

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>

 

to:

 

<?php echo tep_image(DIR_WS_IMAGES_PRODUCTS . $products['products_image'], $products['products_name']); ?>

 

With this simple folder addition and two code changes, the full size images are now only seen on the website when viewed in the popup window. Everywhere else, the corresponding thumbnail is viewed. IrfanView is a great tool for making the thumbnails. I might in future add a new value DIR_WS_IMAGES_THUMBNAILS to better seperate the thumbnails from other images on the site, but the approach described above literally only took about 10 minutes to work through.

 

You can see the results at www.scubaroo.com.au/catalog

 

cheers

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...