View Full Version : design flaw in the cross fade slideshow script ?

03-18-2005, 03:48 AM
it would seem to me there is a design flaw in this script as the script appears to be pre-caching every single image in the array, instead of just pre-caching the next image, which i find incredible?!?!?

thus, when you use this slideshow across 3 images as is used in the examples on this site, it appears to work fine because it only needs to grab 3 thumbnails.

but if you have say 100 * 60k thumbnails, then you are expecting the user to download 6,000 k of images even though they may click a thumbnail after the 3rd image and be taken to another part of the site and never even see the rest of the slideshow.

is it really that unrealistic for a web site to slideshow 100 images?

this unnecessary used of bandwidth seems rather ridiculous and raises some serious scalability concerns about this script. im a cisco person, not a javascript person, but surely there has to be a way of pre-caching the next image sequentially as it is needed, not the entire lot at once?

in my case the slideshow has links, so for all i know the user might get to the 2nd image and think hey thats cool photo, click it and follow it through to the relevant gallery. in that case, i have sent them 5 meg of data for images in the slideshow they never even remotely got near and havent actually seen which is itherefore nothing but an excessive waste of bandwidth for no reason.

to put that in perspective;

on average i have about 90 visitors a day to my blog. lets say i have 100 images in my slideshow inside the blog and on average a user clicks an image to follow it to the gallery after looking at 20 images. this is a consesrvative figure, in reality this is more like 5 or 10 images because only the **** hot photos are put in the slideshow, and therefore lead people to the galleries after only a few images are shown in the slideshow. i display the images randomly to give an even distribution as i know that people only look at the first few images of the slideshow before clicking one.

so using an "as-needed" method as i am now
90 visitors * 20 images * 60 k image size = 108 meg of traffic daily

using this script which pre-loads every single image in the slideshow
90 visitors * 100 images * 60 k image size = 540 meg of traffic daily

thats a 500% increase in my daily traffic usage for that component of my site. the script looks **** hot, but i just cant justify the unnecessary bandwidth usage it brings about.

anyone have any suggestions on what i need to do to alter this script only to pre-cache the next image for the cross fade?

it knows what image it is going to cross fade to, so why pre-cache every image in the entire slideshow when we may not even use them?

just doesn't make sense?


03-18-2005, 04:30 AM
Although I just voted for your idea, I'd like to point out that the scripts here represent a tremendous effort on the part of DD, with which I have no affiliation other than being a frequent poster in these forums. The time and thought saved by using just one script found here is incalculable. If you want a mod of a script, please provide a link to it. Now, in general:

I agree it is best to cache as you go in slideshows
Sometimes it is just easier to write a new script rather than try to retrofit one that caches all at once
An all at once caching script is fine for lots of things, not 100 plus image slideshows though