Solved

Slow image loading on IIS  ASP app (but everything else is fine)

Posted on 2002-03-30
10
327 Views
Last Modified: 2010-08-05
We're running IIS on Win 2k Advanced Server. We also use https.  The ASP application hits all kinds of stuff, SQL, ASP calculations, different vendors, etc.  The performance is great, but the images take much longer to load than the rest of the text.  

These are _small_ little icon-type images -- most times the file size is 1 to 2k. Most are gifs, some are jpgs.

I'll go to the site and the most complicated of queries and page formatting is immediately done, but this little image is still loading for 5 or 6 seconds.

Is this an IIS tuning thing?  Any ideas?
0
Comment
Question by:Notwise
  • 4
  • 3
  • 3
10 Comments
 
LVL 11

Expert Comment

by:ASPGuru
ID: 6907333
right-click on the web-site->Proerties

make sure, that "HTTP Keep-Alives Enabled" is checked on the WebSite-Tab.

This is actually checked by default, but maybe someone unchecked it ...

are the images on the same server / protocoll ?
or are the asp stuff on https and the images on http?

ASPGuru
0
 

Author Comment

by:Notwise
ID: 6907369
ASP Guru,

Thanks for the comment -- I checked the site properties and HTTP keep-alives Enabled is checked.

The images are on the same server, in the same site, just in sub-directory. Within in the asp pages, we tried hard-coding the image path as well as the '../images/image.gif' and it doesn't seem to make a difference.


0
 
LVL 11

Expert Comment

by:ASPGuru
ID: 6907414
does this happen with every browser/client computer?
is bandwidth throttling enabled(Internet Information Services -> Properties)

ASPGuru
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:CodeWizrd
ID: 6907957

Well, what you are saying is to be expected.  You note that you are doing ASP logic, database access, and yet the images are loading last.

Here is what is happening starting when your user clicks someone in his browser to call your ASP page:

1) (Browser) User clicks something significant and waits for an HTML page to be returned.

2) (Server) Server receives the request and loads the requested .ASP document.

3) (Server) Server interprets ASP page, executing script, calling database, etc.  During this process it generates the HTML page and begins to pass it back to the web browser.

4) (Browser) Web browser recieves HTML page, and when the HTML requires an IMAGE, the browser makes a seperate call BACK to the web server to recieve the image.

5) (Server) Intercepts request for image and returns it to browser (between other processing requests)

6) (Browser) Browser displays images when they are downloaded.

The Browser makes seperate requests for each item it finds it needs within the HTML document.  It cannot even make the requests for these items until it recieves the HTML describing these dependencies (it will begin requesting dependencies even if the whole document has not been recieved yet).

One way you can speed the performance up, is to move all of your images to a different web server.  This way, image requests can be served efficiently, without having to compete for CPU and bandwidth against the HTTP and ASP overhead.

Inside your HTML, instead of having:

<img src="/images/eeLogoTop.gif">

Your code would be:

<img src="http://images.mysite.com/images/eeLogoTop.gif">

Depending on your traffic, this could have a profound impact on how quickly your pages load.

CodeWizrd
0
 
LVL 1

Expert Comment

by:CodeWizrd
ID: 6907960

Pardon the typo above.  The user doesnt click "someone", but "something".  Im sure you get the drift...
0
 
LVL 11

Expert Comment

by:ASPGuru
ID: 6908518
CodeWizrd,

of course the images get fetched after the html is built, but some small images shouldn't take 6 seconds...
least of all, if the page is called a second time and all images are cached....
and in fact the browser starts fetching images before the html is finished...

notwise,
how many images do you use? how many different images?
do you set the size of the images in the img tags?
do you use an older computer as a test client?
how big is the html page which gets produced?
does it use complicated hierarchical table structures/formating?

ASPGuru
0
 

Author Comment

by:Notwise
ID: 6908836
In theory I can understand Codewizrd's points, but in reality the image sizes are tiny, there are no more than 30 total images in the whole site, and they take fundamentally longer than the rest of the page to display.

As regards ASPGuru's questions:
1. 30 images total, no more than 2 or 3 on a given page.
2. No, I don't specify the size
3. The test client is a new machine with modern specs.
4. Most of the ASP pages are 10 to 20k of text and when displayed generally fit in a 800 x 600 window.
5. Some of the structures are indeed complicated, but the image delay occurs even in simple pages.
0
 
LVL 11

Accepted Solution

by:
ASPGuru earned 100 total points
ID: 6908847
what cpu usage does the task manager show on the server?

ASPGuru
0
 
LVL 1

Expert Comment

by:CodeWizrd
ID: 6908971

Again, it may be a an issue with resource contention if your server has a decent amount of traffic on it.
0
 

Author Comment

by:Notwise
ID: 6922786
ASP Guru is very helpful.  Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp syntax 3 66
Code Manager | Snippits 2 59
ASP Classic, check if Querystring is UCase or LCase 8 28
Html split(text) Part2 6 20
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

685 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