Some high traffic sites seem to have almost crazy sprited images with almost everything in one big image.
How much of a difference will this make for high traffic sites vs the difficulty in maintenance long term?
I know this may be a bit of a ‘how long is a piece of string’ question but I am interested to understand any experience of performance gains that people have had from such an exercise.
I did some numbers a few years ago for the smallest sized .GIF possible – 43 bytes. To send that 1×1 image, there was 246 bytes of HTTP protocol sent back with it, to say nothing of at least that much for the original request (more if there was also a cookie). There’s also the TCP/IP packet overhead. Beyond all of that though is the round-trip time. The speed of light is still finite, and it needs to be factored in, especially for the overheads of multiple requests.
The short version is, less items downloaded equals faster site. Even if the final sprite image is larger than all the images combined, you still win substantially by reducing the number of sets of overheads and round-trips.