Viewstate versus No Viewstate - Download Calculator

I am trying to tweak some performance for an ASP.Net application.  The page is somewhat database heavy, so I am working on optimizing some other parts of the page right now.... specifically Viewstate.

File sizes of 338,590 bytes with Viewstate versus 146,433 bytes without Viewstate.  As it turns out I don't utilize the viewstate for most of the page (this smaller size is leaving in what I need). 

If am sitting on the web server (or right next to it) with a 100 mega-bit ethernet, plenty of memory, and assuming no other traffic on the network - no collisions (never happens but for the fun of it, just imagine), how long do the files take to download?  Anyone care to give a fair estimate?

If you go to T1 Shopper's Download Calculator you can find out. Turns out the difference (all things being equal) is only .02 seconds ... don't think looking into this much further is going to help me on this one.  That calculator is pretty cool to see how different transfer speeds will add to the download time.

posted on Tuesday, April 27, 2004 2:39 PM

Feedback

# re: Viewstate versus No Viewstate - Download Calculator

Ah, but you forget the rendering time it takes to parse through that extra 150k. Also the amount of time it takes to upload the 150k during a postback. Also keep in mind many high speed interenet connections do not upload as fast as they download.

In this case, I could probably download all that content in about a second. Uploading would take 3-4 ... plus re-downloading it being another 1-2 seconds... lets throw 2-4 seconds of render time (i'm not sure it would take that long, lets just guess, maybe it is lower, 1-2 seconds or maybe less than a second) ... so during a roundtrip, the user will notice 4-6 seconds for upload and download and another 2-4 for rendering.

Oh, do not forget, that sometimes, IE at least, gets hung up composing the HTTP request that sends back large chunks of data, so there could be some more delay in that.

So it is not really just about download size :)

If it comes to the point where you just want to get rid of the ViewState but still need it, check out http://weblogs.asp.net/adweigert/archive/2004/03/09/86628.aspx... It allows you to store the viewstate in a SQL server just like you do session state.
4/27/2004 1:23 PM | Adam Weigert

# re: Viewstate versus No Viewstate - Download Calculator

Adam: Very good points you have. I am now starting to get timings on the different parts of the asp.net events to see exactly what part of the page is really taking the time to render.

You're right, the download size is only a little part of it, but that calculator is kinda neat isn't it?
4/28/2004 12:28 AM | Jason haley

Post Comment

Title  
Name  
Url
Comment   
Please enter the following code into the box below to stop spammers

  
Enter Code Here *