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

P

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
 
V

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]
(e-mail address removed)
 
M

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top