Home All Groups Group Topic Archive Search About

any performance comparisons between retrieving large result set with DataSet/Fill verses Generic Lis

Author
18 Apr 2006 3:52 PM
Peter Kellner
I'm looking for a comparison of using Strongly typed datasets and
using a generic list.

Specifically, I'm wondering if when I use vs2005 and create a dataset,
tie it to an ObjectDataSource, plug that into a gridivew, if the
performance is any different than if I create an c# class that uses
standard reader and getter functionality to poplulate a generic List.

anyone can point me at an article or give me there two cents would be
appreciated.

Thanks

Peter Kellner
http://peterkellner.net

Author
19 Apr 2006 6:38 AM
Vasco Veiga [MS]
I don't have such an article.

But given that a DataSet is an in cache memory representation, that has to
be populated using a SqlReader at some point, and your list would use the
same SqlReader, it's probable that the code using list will be faster.
That said, it's not apples to apples, your list wont allow change
management, revert changes, queries, serialization, calculated fields,
events, etc...

My two cents are to start with the tool that is easier to maintain/code,
then measure perf (or prototype before) and depending on whether you meet
your perf criteria or not, look for ways to optimize it.

--VV [MS]
vas***@microsoft.com

Show quote
"Peter Kellner" <pkellnern***@73rdstreet.com> wrote in message
news:hl2a42panhuaqmqul9s22k7falnli7etd8@4ax.com...
> I'm looking for a comparison of using Strongly typed datasets and
> using a generic list.
>
> Specifically, I'm wondering if when I use vs2005 and create a dataset,
> tie it to an ObjectDataSource, plug that into a gridivew, if the
> performance is any different than if I create an c# class that uses
> standard reader and getter functionality to poplulate a generic List.
>
> anyone can point me at an article or give me there two cents would be
> appreciated.
>
> Thanks
>
> Peter Kellner
> http://peterkellner.net
Author
19 Apr 2006 11:09 AM
Manu
The DataSet always eats more memory than with a reader. If you're
retreiving large result sets you should do custom paging or it will be
slow if there are a few simultaneous users.

If you use an ObjectDataSource with a GridView it will be a bit slower
because the ObjectDataSource uses reflection to find and call the
methods and to set the properties. You can check this comparision
between direct calls vs reflection calls:

http://www.manuelabadia.com/blog/PermaLink,guid,772c7152-b00e-4334-b677-bfbdcd8e6b5d.aspx

Hope it helps,
Manu.

AddThis Social Bookmark Button