Solved

image loading

Posted on 1998-02-10
8
198 Views
Last Modified: 2010-04-16
When loading 100 small 1k images into a web page, is it faster to paste the images together into one image (so your loading one 100k image) and then crop them into your image array. If so, by how much. Personal email at kevinh@natech.com
0
Comment
Question by:kevinhol
8 Comments
 

Author Comment

by:kevinhol
ID: 1232982
Edited text of question
0
 
LVL 2

Expert Comment

by:shogi
ID: 1232983
It's more faster to load 100k than 100 1k images. When it's better to go in 100x1k, it's for visual effect on HTML page and give to the user some visual result more faster.  How much, it's depend of your method and the quality of the connection.

0
 

Author Comment

by:kevinhol
ID: 1232984
The question asked "how much", meaning a rough percent difference between the two scenarios. The question logically assumes that the method and quality of connection remains constant.
0
 
LVL 1

Expert Comment

by:froderik
ID: 1232985
Wou would need to perform a test then. I think it is quite hard to do such a test on the Internet since the connection quality changes all the time. If you work in an internal network perhaps you can test it. The question I guess is how long does it take to establish a new URL connection compared to the time it takes to download 1k.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 3

Expert Comment

by:gwalters
ID: 1232986
Even if you could get all 100 requests on the same connection (i.e. Keep-Alive), there's still an overhead of at least 300 bytes per request, which would be siginificant for only 1K of data.


0
 

Author Comment

by:kevinhol
ID: 1232987
I understand that a practical test could prove inaccurate. However to truly call ones self an expert, a person should have some idea how the Virtual Machine loads images into an applet over the web. This should be enough info to come up with a theoretical percent difference to answer the original question with some degree of accuracy. Points are now increased to 150.
0
 
LVL 3

Accepted Solution

by:
gwalters earned 150 total points
ID: 1232988
OK, loading one image that is a concatination of 100 images is A LOT more efficient, network-wise.  However, are you using all images right away?  If not, there may be a perceived slowdown since Java doesn't load images until they are actually used.

As I said in my earlier comment, there is at least a 30% overhead in just the HTTP request/response.  Then there is the opening of the connection, which has nothing to do with Java, JVM, etc.  It's a TCP/IP thing.  I would guess about a 10:1 improvement.

0
 

Author Comment

by:kevinhol
ID: 1232989
I guess this wasn't a totally ideal question for a Java programmer to answer, because of the complex WAN overheads. Because of this I will accept your rough questimation of 10:1. It is a ratio that I somewhat expected. If you would have wrote it with some authority like 9.934:1 I dought that very many people could dispute this. Thanks for your input.  
                           
   
 
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now