Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

image loading

Posted on 1998-02-10
8
Medium Priority
?
207 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
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

705 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