InterviewSolution
Saved Bookmarks
| 1. |
Does ViewState affect performance? What is the ideal size of a ViewState? How can you compress a ViewState? |
|
Answer» If the application is storing a LOT of data in ViewState it can AFFECT the overall responsiveness of the page, thereby affecting performance since data is stored on the page itself in hidden controls. The ideal size of ViewState should be LESS than 30% of the page size. DeflateStream and GZipStream are the classes in ASP.NET that provides methods and properties to COMPRESS and decompress streams. Using these classes to compress ViewState will REDUCE its size to around 40%. |
|