Iron Speed Technical Forums
Sign up Latest Topics

  Author   Comment  

Avatar / Picture

Posts: 223
Reply with quote  #1 
could you tell me what do you think about setting the default setting to keep ViewState in the Session instead of a page?
Currently default is to set ViewState with the page to browser and back. That slightly affect performance of the page because increases a number of bytes sent. On default generated page ViewState might add about 30% to the page size.
However it works even when session is not available, for example if cookies are disabled. On another hand if there is no Session a lot of functionality will not work anyway and we assume that generated application always has Session.
Of course all it takes to change is go to Performance Tuning menu and selecting Session. But I doubt that this is obvious and I'm not sure a lot of you pay attention to this.

So what do you say, does it worth changing default to save ViewState in Session and improve performance by default with the described above limitation in mind?

Avatar / Picture

Iron Speed MVP
Posts: 556
Reply with quote  #2 
Hi Krill

I use it where there is a large view state payload and I have only a handful of users all logged in at the same time. If memory is tight on the server it may backfire with a reset of the session if it runs low on memory. Definately a good idea for mobile devices I would think where the pages should be a bit simpler!

Tim Titchmarsh Iron Speed Consultant MVP
London UK based
+44 (0)1621 835002

Posts: 648
Reply with quote  #3 

I would leave the default to page and allow view state to be configured down to the actual page. Where there are plenty of resources (memory) it can be implemented system wide where resources are limited but some page(s) might benefit then set the individual page view state to session.  Typically on most pages it’s a non-starter but on large layouts, show table (report) and mobile pages loading view state and pushing it back to the server (on post backs) can add many seconds to the page life cycle.

A question I would have is will IS implementation of storing view state in session work on a server farm where load balancing takes place.

Thank you,
Phil Porter

Avatar / Picture

Posts: 223
Reply with quote  #4 
Yes, it will work on the farm. Load balancer (at least those I've seen) preserve virtual channel between browser and particular server. Said that I'd recommend to simply configure SessionStateMode to StateServer and that guarantees that Session will never be lost on a web farm.

Thank you all for comments.
Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement