PDA

View Full Version : Image w/ description tooltip with sprite



Dodgeitorelse
05-17-2011, 11:30 AM
1) Script Title: Image w/ description tooltip v2.0

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

3) Describe problem: Everything works fine with this script. What I am searching for is a way to use css sprite to speed up our page load time. I have created thumbnails for our images as well as the css sprite file. We have 190 images that are each being loaded which took approximately 9-10 secs. How do I implement the sprite? Also with this many images, being that we add new images to the list periodically, what would be the best way to implement the sprite? With 20 or so images in each file or to have all images in one file?

We did use this modified code by DDAdmin to get load time reduced by about half http://www.dynamicdrive.com/forums/showthread.php?t=61079&highlight=Image+description+tooltip

Dodgeitorelse
05-19-2011, 07:19 AM
Anyone?

jscheuer1
05-19-2011, 08:22 AM
A sprite isn't going to get you anything over that modified version of the script.

It loads each image only the first time it's needed. If you had a sprite with that, the very first image would take a minute or more and then all the rest would be instantaneous.

What would speed up the loading of each individual image would be to optimize all of them.

Give me your largest image (byte size) that gets used in a tooltip, I'll show you what can be done with it via optimization.

Dodgeitorelse
05-19-2011, 12:56 PM
My largest size for images is 7 KB. In case you would like to see how they are used click here (http://dodgeitorelse.dyndns.org/chevy_test_server/downloads.php).

I have this table sortable from a script so I am sure that is also part of the load time issue.

Thank you.

jscheuer1
05-19-2011, 02:32 PM
The largest I could find in the mapimages folder was 21K:

pipeline_z.jpg

But you don't appear to be using it. That one and some others in the 10+ K range could be optimized - If you're using any of them.

But, from what I can tell, the tooltip script is adding very little to the load time as each tip image is clearly loading on demand. It's possible they are also loading as the page loads, but that would mean that the modified version of the script you are using isn't performing as advertised. If so, that could be fixed.

I have a 100mbps connection, and here the page takes very little time to load. Definitely well under the dreaded 8 second limit that supposedly turns away many users.

You say the table is being sorted. To test how much time that takes, you could make up a duplicate page without that and see what difference if any in load time that makes.

Dodgeitorelse
05-19-2011, 04:20 PM
ok thank you . I will try the duplicate page idea and see what results. You are correct with some larger images being in the file. However, the only ones I am using are the thumbnails (images starting with tn in their name). Again thank you for your help and suggestions.