Last post Oct 25, 2011 08:18 PM by desertfoxaz
Feb 17, 2011 11:09 AM|desertfoxaz|LINK
I have an application that uses an Asynchronous HttpHandler for retrieving images from a fileshare It appears the performance of this is quite poor. I have two questions:
in the body onload event, it doesn't get excuted until all four images are finished loading.
2. Does it matter what the IsReusable property is set to? Currently it is set to false. I haven't seen any definitite answer on what the appropriate value should be, if it even matters. The handler does implement IRequiresSessionState because I need to
access data in Session state, but I don't know if that has any bearing on this.
Feb 17, 2011 11:53 AM|srameh|LINK
If you are not writing ot the session then change IRequiresSessionState to IReadOnlySessionState. It will help with the performance.
Oct 19, 2011 04:25 PM|desertfoxaz|LINK
I know it's been nearly eight months since my original post but I wanted to thank you because you were right on about this. I have several applications that use handlers that implement IRequiresSessionState and it seems when I switched that to IReadOnlySessionState
it got a lot faster. I'll have to research this but it seems that IRequiresSessionState is not thread-safe...
I will need to update all my applications to do this. I've been spending a lot of time trying to fix performance issues with my application and I must have missed your response because it would have saved me a lot of time. I'll be sure to let all the other
developers know about this.
Oct 19, 2011 10:39 PM|srameh|LINK
Oct 25, 2011 02:52 PM|desertfoxaz|LINK
From what I read you're not supposed to implement both IRequiresSessionState and IReadOnlySessionState. I am using only IReadOnlySessionState and when I disassemble with Reflector, it says both interfaces are implemented. Is this right?
Oct 25, 2011 08:18 PM|desertfoxaz|LINK
Never mind, it shouldn't believe everything I read in books. IReadOnlySessionState implements IRequiresSessionState, according to the MSDN documentation.