WebUI.NET Framework 2007 – Part I

In this first sequel of my post around our upcoming WebUI.NET Framework 2007, I would like to share some major improvements in Framework 2007 especially in performance and memory usage area.

Before I started with the improvement in the new version, let’s take a look back first to the previous version — and understand what’s the existing issue.

Well, our Framework includes powerful caching library. This caching library can be used to any kind of data – primarily view state and data item (used in WebGrid and WebCombo). By default, the cache for ViewState is enabled and the storage is set to PageCache.

There are many articles on how to optimize ViewState but we are not going to cover it here. With our Framework’s capability to save the ViewState to PageCache instead of Client is definitely useful and helpful for application developers. So, by default, our controls won’t hike up your page’s view state because it’s not saved to Client.

Now, the problem arise because the caches used by the ViewState is using considerable large amount of memory when a lot of users hit the page at the same time. This is the point when your application will raise OutOfMemory exception — and many of our customers consider this as memory leak. With this simple explanation, we knew this is not leak, but simply a feature that is used inefficiently.

Our goal for Framework 2007 is to have the best performance and best memory usage right out-of-the-box. The good news about Framework 2007 is that it has resolved the aforementioned problems with some changes as in following:

  • The cache storage default is no longer set to PageCache. After deep consideration, we decided to set it to Client (as of all ASP.NET controls default). For advanced users, they can simply set this value in web.config.
  • Now since we used Client storage, we need to optimize the saved state as much as possible to reduce the control’s viewstate size. This is where our new implementation of SmartViewState algorithm comes to help. The new viewstate serialization now reduces the size up to 60-70 percent. So, whether you used Client or PageCache storage, you automatically get this benefit.
  • New implementation of PageCache storage. Eventhough you decided to use PageCache after migrating to Framework 2007, you will see dramatic reduction in memory usage. Our research shows about 50 percent saving on the memory usage after migrating to the new Framework.

The combination of these improvements, in overall, significantly improves performance and reduce memory usage to the minimum level.

Another interesting new feature that related to CacheStorage is our new CacheToDisk option. I will blog this exciting feature in my next post.

All the best.