Forum Moderators: not2easy
They say for every object on a page a modem user will recieve approximately .2 seconds of additional dowload time on top of the regular download time.
A have a area on my website which allows for up to nine 30x100 images next to each other. I was going to use this area to provide image links to site sponsors. Lets say I have 40 rotating 30x100 images. Meaning that they appear randomly on each page in no particular order.
My problem is that this will add 9 objects to each page which will increase my 'round-trip latency' by at least 1.8 seconds. I was wondering about using the GD Graphics Library to dynamically combine these images into one large image for each page knocking 1.6 seconds off my page download time.
I know drawing images dynamically can consume a lot of server resources but will combining images be that much of a system hog?
A large majority of my visitors will be 56k users, so shaving that 1.6 seconds is very very important.
I can always test it myself, I was just hoping someone here might have already tried it so I don't waste time writing the script to see how it works.
One big image will transfer faster than nine small images. Because you have less overhead, but the difference is going be so small most people probably would not notice.
5 or 6 years it might have made a difference. Back in the good old days of the web, to transfer each image required a seperate TCP connection to the server. But with the advent of HTTP 1.1 the web browser can keep a connect to a server open and transfer multiple images across it. Thereby saving the overhead required to establish multiple connections.
Also by having seperate images they will be able to be stored in the browsers cache individually. While if they are combined into one big image the the image is stored as a whole. If you use the images on several difference pages then it may in fact be faster to go with several small images rather than one big one.
Also by having seperate images they will be able to be stored in the browsers cache individually. While if they are combined into one big image the the image is stored as a whole. If you use the images on several difference pages then it may in fact be faster to go with several small images rather than one big one.
Very well, racer_x!