Solved

image loading

Posted on 1998-02-10
8
199 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

15 Experts available now in Live!

Get 1:1 Help Now