Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Databinding and Gui controls> Viewstate Question
 

Pages: 1
Databinding and Gui controls
Viewstate Question
Page:1/1 

  Print all messages in this thread  
Poster Message
pd
User



Location:

Joined on:
29-Nov-2006 23:06:03
Posted:
3 posts
# Posted on: 29-Nov-2006 23:20:18.  
Hi All,

I've been experimenting with LLBLGenProDataSource control and databinding and have a question about viewstate size.

I have the Nov 6 release of LLBLGenPro 2.0

My table has a total of 4 rows.
The mapped entity has 2 integer, 1 string & 1 boolean properties.

If I bind a collection of these entities to a gridview control using the LLBLGenDatasource the viewstate size for the LLBLGenDatasource is 7760 bytes.

Because I want to apply a filter to the collection I use the Perform_Select event, disable livepersistance and retrieve the filtered data (2 entities returned instead of 4). The viewstate size for the LLBLGenDatasource is now 29240 bytes....

Am I doing something wrong? Why such a huge increase?

Thanks
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
13799 posts
# Posted on: 30-Nov-2006 09:22:38.  
The viewstate size depends on the number of controls that use it.

To test for the LLBLGenProDataSource, you may create an empty web page with just a one LLBLGenProDataSource and the datagrid to display the data. And then try to replicate your scenario.

Also I think having a ViewState with 10-30 Kb is acceptable, otherwise if you want more light weight, then you might use DataTables(TypedLists, TypedViews & DynamicLists), instead of EntityCollections.


  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
34993 posts
# Posted on: 30-Nov-2006 09:47:22.  
You can also set the datasourcecache to session instead of viewstate. That's normally more efficient, as it doesn't need to use serialization in that case.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
pd
User



Location:

Joined on:
29-Nov-2006 23:06:03
Posted:
3 posts
# Posted on: 30-Nov-2006 20:38:21.  
Thanks guys. I've experimented with a typed list and the footprint is much smaller so for larger results I'll use those instead.

Cheers


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.