StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Use of the internal data tableExpand / Collapse
Author
Message
Posted 11/30/2005 7:25:32 AM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 03/25/2006 6:08:39 PM
Posts: 36, Visits: 65
We are going to have a very large application, with many business objects. Many of the business objects will have a lifetime equivalent to the time the application is running, for efficiency reasons. Also most of the objects will represent  just one record in the database.

Is there a penality to pay, in terms of memory usage, by keeping the Datatable around rather than storing the columns in private variables, wrapped with properties and then getting rid of the datatable?

I guess I am making an assumption about what is going on so correct me if I am wrong

There are so many things in this product and I am impressed, and trying to convince my associates this is the tool to use.

Thanks for all your help

Post #192
Posted 11/30/2005 8:44:19 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 9:09:33 AM
Posts: 2,661, Visits: 1,876
There is a slight memory penalty for using a DataTable with one record, but nothing like using a DataSet. This is the main reason we used a DataTable rather than a DataSet. If you use a DataSet with only one record, you're looking at about 8x the memory usage as a DataTable with only one record.

Realistically, the memory usage penalty is negligable for storing only one record in a DataTable and it's worth it to incur that penalty to be able to store multiple records in the same class that is used to store a single record.

With an O/R mapper, you'd have a slightly smaller memory footprint for each "entity" object, but the entity collections are not as efficient at storing multiple records as a DataTable. The performance and functionality penalties of using the custom collection are far worse than the memory penalty of the DataTable.

Note: This is especially true for .NET 2.0 as the ADO.NET team really improved the indexing performance of a DataTable making it much faster than a custom collection for sorting, filtering, and navigating the records.


www.bungie.net
Post #195
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:13pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.109. 9 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.