Johan Kronberg
May 11, 2012
  6005
(5 votes)

Speed up Edit Mode: Set EnableSessionState to false

Did you now that if session state is enabled, the default ASP.NET setting, all requests from the same user session get queued and processed one after another? Disabling session state will make your server process all those requests simultaneously.

Of course this makes the framed Edit Mode load a bit faster since your non session page template will be processed without having to wait in line with other requests.

Another common situation is AJAX requests being sent to other EPi pages "on load". If your server can finish these at the same time you most likely will have saved quite a few milliseconds for your users.

A third scenario that most of you have seen is when you have built a Web Form that interacts with a remote HTTP service or doing something else that always or occasionally takes a lot of time to complete. You (or even worse, your user or editor) keep waiting for the page to load but then give up and try to navigate to another page. This request of course gets put in your session request queue and the only thing besides waiting that will get you to browse pages on your web site again is to restart your browser and get a new session.

Conclusion: Disabling session state for your EPiServer template ASPX files will most likely give you a big performance boost and make long running requests easier to escape.

It's really easy too, just set the property in the Page directive like this:

<%@ Page Language="C#" EnableSessionState="false" %>

You can set this setting in Web.config too but for EPiServer sites I don't recommend this since it would need to be put in the root system.webServer element and then reset in child location elements where session state status might interfere with base EPiServer functionality.

In your web site's web forms you should have a really good reason to use Session for anything so for most projects this can be done without hassle.

May 11, 2012

Comments

Please login to comment.
Latest blogs
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024

Frontend Hosting for SaaS CMS Solutions

Introduction Now that CMS SaaS Core has gone into general availability, it is a good time to start discussing where to host the head. SaaS Core is...

Minesh Shah (Netcel) | Jul 20, 2024

Optimizely London Dev Meetup 11th July 2024

On 11th July 2024 in London Niteco and Netcel along with Optimizely ran the London Developer meetup. There was an great agenda of talks that we put...

Scott Reed | Jul 19, 2024