State vs performance in ASP

Most ASP developers already know that maintaining state in ASP pages comes 
at a performance cost and that you should avoid persisting state when it 
makes logical sense to do so. But did you know that you could be paying a 
performance cost for state management even when your code isn't using it?

The issue is that the ASP engine makes room for the possibility you'll use 
state management features of the session object even if you never refer to 
any of them in code. So, if you know that you aren't using state at all, 
you should add the directive

<%@ EnableSessionState = False %>

to any page that doesn't require the session object. This declaration allows 
ASP to process scripts concurrently instead of sequentially and will improve 
overall performance.

You might also like...

Comments

ElementK Journals

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry