Solved

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

Posted on 2002-03-30
10
334 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
[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
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

728 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