Quick Nav:  Online Store   |   Login | Register

Questions about Postback and Viewstate

Rate this topic:

Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
Amit Kagan
<20 Posts
Posts:1


07/26/2007 3:15 AM  

 

Hello.

I'm evaluating PageBlaster for deployment in a site I'm developing. I will start by describing my context and then move to two fairly general questions. Specifically, I have a performance problem in the site's home page.

The site is using DNN and Catalook, and the home page has 3 Catalook modules (ItemPane_NF). Those modules each take a relatively long time to load on the server, and as a result the home page appears sluggish. The point is that each time the end result is the same -- the page is identical besides the viewstate key (the viewstate is stored in the server's memory).

My questions:

1) When I use PageBlaster, the served homepage is the same, including the viewstate key. Should this worry me? I saw in past posts that a special treatment was to be given to the viewstate. What has come of this?

2) Those 3 Catalook modules contain server-side buttons. On a postback, I noticed the cache of the page is cleared. According to the manual, I gather that only when an authenticated user posts back, the cache should clear. Can you clarify when the cache is cleared? Since I believe I prefer it not to clear, can I do something to prevent it or to recreate the cache right away without waiting for the next request?

 

Thanks,

  Amit

John Mitchell
Posts:3248


07/26/2007 8:06 AM  
Hi Amit,
These are good questions.

For #1. The cached page will have whatever viewstate was in it when the page was cached. This should not be a problem since the cached page returned depends on if the user is logged in and what parameters were on the url whn it was cached. If you are experiencing errors on postback then I there is a problem, but otherwise I would not worry about it. I did some work early on with viewstate, but it turned out that manipulating it on the server while at the same time compressing and caching pages to memory and disk was causing a performance penalty unless there was a lot of viewstate (over 20K).

For #2. What you are observing is how it is designed. Any postback logged in or not will clear the cache for that page and return a page that has not been cached. This is because even anonymous users can post information to the server that may change the result they are supposed to get back. The reason the page is not immediately cached again is because the extra processing for caching the page would cause a performance hit. The additional request to put it back in cache is a normal page build, but if I cache it on the request that cleared it then all those requests would be slower than "normal" requests.

Generally I would try to avoid having postbacks on pages that are used often especially if the postback is not producing a unique page.
Please Register to post a reply. Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
Forums >Snapsis Product Support >PageBlaster > Questions about Postback and Viewstate



ActiveForums 3.7
Powered by: Snapsis Software