November Happy Hour will be moved to Thursday December 5th.

Johan Kronberg
May 11, 2012
  6117
(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
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog

I'm running Optimizely CMS on .NET 9!

It works 🎉

Tomas Hensrud Gulla | Nov 12, 2024 | Syndicated blog

Recraft's image generation with AI-Assistant for Optimizely

Recraft V3 model is outperforming all other models in the image generation space and we are happy to share: Recraft's new model is now available fo...

Luc Gosso (MVP) | Nov 8, 2024 | Syndicated blog