Solved

image loading

Posted on 1998-02-10
8
202 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

740 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