J
joey.powell
Hello guys, I have a pretty simple app that reads XML data (.ReadXML)
into an in-memory dataset, runs some linq queries, mods the data, and
then writes the XML (.WriteXML) back to disk.
Everything works well until, occasionally, I get an
OutOfMemoryException. So far this has only happened for a file that
was about 50MB in size. All other, smaller files are working just
fine.
50MB (+overhead of other objects etc...) certainly does not seem like
an unreasonable amount of data to hold in memory. How can I get this
to work without the error? Can I manually allocate more memory for the
DataSet and .ReadXML? Why doesn't it take advantage of more of the
available memory?
I know that there are lots of other ways to do this...but I am not
interested in reengineering the code. I just want it to work, because
I have since moved on to other projects. Is there a "quick and dirty"
way to make my app able to handle the 50MB of data in memory? This
does not seem like it should be such a big deal.
Apparently the .ReadXML and .WriteXML methods of the DataSet are not
very scalable!?
into an in-memory dataset, runs some linq queries, mods the data, and
then writes the XML (.WriteXML) back to disk.
Everything works well until, occasionally, I get an
OutOfMemoryException. So far this has only happened for a file that
was about 50MB in size. All other, smaller files are working just
fine.
50MB (+overhead of other objects etc...) certainly does not seem like
an unreasonable amount of data to hold in memory. How can I get this
to work without the error? Can I manually allocate more memory for the
DataSet and .ReadXML? Why doesn't it take advantage of more of the
available memory?
I know that there are lots of other ways to do this...but I am not
interested in reengineering the code. I just want it to work, because
I have since moved on to other projects. Is there a "quick and dirty"
way to make my app able to handle the 50MB of data in memory? This
does not seem like it should be such a big deal.
Apparently the .ReadXML and .WriteXML methods of the DataSet are not
very scalable!?