Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
Kirill

Avatar / Picture

Registered:
Posts: 223
Reply with quote  #1 
Guys,
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?
timt

Avatar / Picture

Iron Speed MVP
Registered:
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
http://www.lightspeeditsolutions.co.uk/dotnetarchitect
timt@dotnetarchitect.co.uk
timt@lsits.co.uk
porphi

Registered:
Posts: 647
Reply with quote  #3 
Krill,

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
PPG&A, INC.
pporter@ppgainc.com
http://www.ppgainc.com
https://rapidsprout.com
678-362-2035
Kirill

Avatar / Picture

Registered:
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
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement