473,508 Members | 2,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XmlDataDocument/DataSet memory usage

Thanks to many on this newsgroup, I now have a prototype Windows Forms C#
app that reads xml documents into DataSets via XmlDataDocument, and does
*stuff* with it.

I basically have about 25 megs worth of xml data that I read in and operate
on. Once loaded, before doing anything of substance with the data, my app's
memory footprint goes up to nearly 140 megs right off the bat.

Question is, if this is not an expected observation, what should I look at,
in general, to cut down the footprint closer to the size of loaded files?

Thanks in advance!

Derrick
Nov 15 '05 #1
1 2013
To find out exactly how much memory you are actually using you can run a quick
GC.Collect(). With the 140 megs, what you are most likely seeing, is a bunch of
objects sitting around that were part of the import process, but aren't part of
your
memory footprint that are actually being used.

Note that moving forward and creating new objects within your application will
be
a little slower at first because your application will have to reallocate all of
the pages
of memory that were deallocated during the GC process. If you don't plan on
creating
a large number of objects then this won't be a large issue. If you do plan on
doing a
lot of work, then eventually you'll re-use that 140 megs of memory, so don't
even bother
with the GC collection.

--
Justin Rogers
DigiTec Web Consultants, LLC.
Blog: http://weblogs.asp.net/justin_rogers
"Derrick" <de*********@excite.com> wrote in message
news:OC*************@TK2MSFTNGP11.phx.gbl...
Thanks to many on this newsgroup, I now have a prototype Windows Forms C#
app that reads xml documents into DataSets via XmlDataDocument, and does
*stuff* with it.

I basically have about 25 megs worth of xml data that I read in and operate
on. Once loaded, before doing anything of substance with the data, my app's
memory footprint goes up to nearly 140 megs right off the bat.

Question is, if this is not an expected observation, what should I look at,
in general, to cut down the footprint closer to the size of loaded files?

Thanks in advance!

Derrick

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1307
by: Raj | last post by:
hi, I associate dataset with one xmldatadocument? how can I disassociate from xmldatadocument, so I can associate with another xmldatadocument. and, how can I remove xmldatadocument from...
0
2138
by: gilly3 | last post by:
Reposting to a more relevant group. I am passing a generic dataset into a new XMLDataDocument and then parsing the XML with XSLT. The idea being that I can parse any dataset with the same xslt,...
2
3890
by: James Ankrom | last post by:
Why does this fail? Dim relResources As New Data.DataRelation("Application_Resources", ..Tables("User_Applications").Columns("Application_id"),...
3
2150
by: Derrick | last post by:
I am reading in xml files that equate to sql tables, via XmlDataDocument, and then operating on the DataSet. With the most simple app that just loads the xml doc, I see the memory footprint of the...
2
2296
by: deko | last post by:
I create an XmlDataDocument Dataset when the main form of my WinForms app opens. The user will make changes to the Dataset, and then those changes should be saved to the XML file when the code...
0
1420
by: Steve | last post by:
I have a dataset. I fill it with two recordsets from SQL queries. Tables are called tblPlanFYSpendingStage, tblSpendingStage.
4
8261
by: Adrian Meyer | last post by:
Hi, On the server I code the following web service: ))] public XmlDataDocument GetTypedXmlDataDocument() { sqlDataAdapter1.Fill(typedDataSet1); XmlDataDocument dataDoc
1
2865
by: JD | last post by:
I have a DataGridView with a DataSet as DataSource. The user can update the contents of the DataGridView, and then click on a Save button to save the data to an XML file. When they click on...
2
5822
by: ERingmae | last post by:
Hi, The environment is .NET 2.0, the language is C# and the problem is reading XSD file with xs:redefine section correctly to a XMLDataDocument.DataSet. What I am trying to do: I am trying...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.