Sometimes session state just existing kills performance. Seriously, putting a single boolean value in there can KILL your performance in some cases. Here's a specific example:
You have a dashboard page, and it hosts several little modules that each load their content via ajax. If you are using the session, you can only load one module at a time because the session is locked (per-user) during a request. If the session is not being used, there is no lock, and the browser will be able to request the maximum number of resources (4 or more concurrently).
See "Concurrent Requests and Session State" here:
http://msdn.microsoft.com/en-us/library/ms178581.aspx
If you run into this, either don't use the session, or set it to read-only (this is hard to do in ASP.NET MVC last time I checked).
Update: Two more real-world scenarios where this can happen:
- You have an asp.net page that writes images to a binary response. You do this because you need to check permissions or other conditions to determine whether and which image to serve. If you have a bunch of image tags referring to this page in their SRC to fetch images, you will only be able to get one at a time.
- You have an admin console that lets you manage tasks. You want to be able to hit a button and kick off the tasks on the server asynchronously with ajax progress bars. If your ajax calls request asp pages when you have a session (whether you refer to it or not) you will only be able to run one at a time. I guess this is similar to the dashboard example but I actually ran into this one and it killed me.