473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Improving HttpHandler parallelism

I have a performance issue related to HttpHandlers.

I've written a photo gallery application that uses HttpHandlers to
manage a virtual URL to my thumbnails. When I render the document with
the actual thumbnail URLs, the images appear to load instantly. When
using the HttpHandler, it looks as if the images are loaded one at a
time -- as if the HttpHandler execution is serialized. I assume this
is caused by ASP.NET processing the request vs. the standard IIS
static file handlers. Is there a way to improve the simultaneous image
loads?

The code in the httphandler is almost literally this (where filepath
is created via concatenation):
image = Image.FromFile(filePath);
HttpContext.Current.Response.ContentType = "image/jpeg";
image.Save(HttpContext.Current.Response.OutputStre am,
ImageFormat.Jpeg);

Feb 26 '07 #1
2 1512
if you use sessions, then requests are serialized for the same user.
turn off session support. you should add code to handle head requests so
the browser can use cached images. also add timestamp info to headers
note: the browser will only do 2 requests at a time.
-- bruce (sqlwork.com)

Alan Samet wrote:
I have a performance issue related to HttpHandlers.

I've written a photo gallery application that uses HttpHandlers to
manage a virtual URL to my thumbnails. When I render the document with
the actual thumbnail URLs, the images appear to load instantly. When
using the HttpHandler, it looks as if the images are loaded one at a
time -- as if the HttpHandler execution is serialized. I assume this
is caused by ASP.NET processing the request vs. the standard IIS
static file handlers. Is there a way to improve the simultaneous image
loads?

The code in the httphandler is almost literally this (where filepath
is created via concatenation):
image = Image.FromFile(filePath);
HttpContext.Current.Response.ContentType = "image/jpeg";
image.Save(HttpContext.Current.Response.OutputStre am,
ImageFormat.Jpeg);
Feb 26 '07 #2
That nailed it. Thanks a million.

On Feb 26, 11:56 am, bruce barker <nos...@nospam.comwrote:
if you use sessions, then requests are serialized for the same user.
turn off session support. you should add code to handle head requests so
the browser can use cached images. also add timestamp info to headers

note: the browser will only do 2 requests at a time.

-- bruce (sqlwork.com)

Alan Samet wrote:
I have a performance issue related to HttpHandlers.
I've written a photo gallery application that uses HttpHandlers to
manage a virtual URL to my thumbnails. When I render the document with
the actual thumbnail URLs, the images appear to load instantly. When
using the HttpHandler, it looks as if the images are loaded one at a
time -- as if the HttpHandler execution is serialized. I assume this
is caused by ASP.NET processing the request vs. the standard IIS
static file handlers. Is there a way to improve the simultaneous image
loads?
The code in the httphandler is almost literally this (where filepath
is created via concatenation):
image = Image.FromFile(filePath);
HttpContext.Current.Response.ContentType = "image/jpeg";
image.Save(HttpContext.Current.Response.OutputStre am,
ImageFormat.Jpeg);- Hide quoted text -

- Show quoted text -

Feb 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jim_geissman | last post by:
I have a function that returns a table of information about residential properties. The main input is a property type and a location in grid coordinates. Because I want to get only a certain...
4
by: T Dubya | last post by:
We're experiencing a large number of deadlocks since we began running SQL Server 2000 Enterprise Edition SP3 on a Dell 6650 with hyper threading intel processors. We don't have the same problem on...
3
by: kev | last post by:
Hi, I have a sql 2000 server with 8 processors, server settings are as default. I read on Technet that it is good practise to remove the highest no. processors from being used for parallelism,...
5
by: Evan Smith | last post by:
We recently upgraded the box that hosts our main DB2 database to an 8-CPU machine with 8 GB of memory. With all the extra horsepower, we were eager to test performance with intra-parallelism turned...
2
by: Hanse Davion | last post by:
Can anyone provide some insight on what this problem could be? I have searched the web, read forums, and all the installation documentation for the dotnetnuke feeware portal from asp.net. I am...
3
by: Jed | last post by:
I have written an HttpHandler which I invoke through an ashx page. The HttpHandler does various things to process the request, then it is supposed to redirect to a confirmation page. Everything...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
6
by: paul | last post by:
hi, i've set 'max degree of parallelism' to 1 because some sql request hanged. Now when i connect, how can i set the parallelism to 4 for a session. Is there a command like this : 'alter session...
5
by: zlf | last post by:
Hello, I try to use a custom HttpHandler to add something to session, then display the original page. public void ProcessRequest(HttpContext context) { context.Session = "test"; } But, a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.