473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

save the XML string or the XmlDocument object in session?

Bob
I'm wondering how much more memory an XmlDocument object takes than the
corresponding Xml string? I have some user data to store in ASP.NET session
and everytime it's used, an XmlDocument object is needed. If there's not
too much difference in the memory consumption, then saving the object would
make more sense than just saving the string.

On a side note, is there a way to find out the memory usage of a variable at
runtime? Does VS.NET debugging capability somehow do this?
Nov 18 '05 #1
1 2900

Well, the DOM will take up some space for sure as the XML document is
represented as a binary tree in the object. The behavior will actually vary
depending on whether you're using an InProc session or one of the serialized
mechanism like State or Sql Server in which case the XMLDocument will
serialize into an XML stream anyway.

I'm not sure to be honest how much difference in perf there will be, but it
should be easy to test with a few simple timing tests that write and read
data into Session.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
" Bob" <bo*******@yahoo.com> wrote in message
news:OF**************@TK2MSFTNGP11.phx.gbl...
I'm wondering how much more memory an XmlDocument object takes than the
corresponding Xml string? I have some user data to store in ASP.NET session and everytime it's used, an XmlDocument object is needed. If there's not
too much difference in the memory consumption, then saving the object would make more sense than just saving the string.

On a side note, is there a way to find out the memory usage of a variable at runtime? Does VS.NET debugging capability somehow do this?

Nov 18 '05 #2

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

Similar topics

8
by: terrorix | last post by:
I also posted this article at: microsoft.public.dotnet.framework.aspnet -------- Hi, I Have this sql select(MS SQL): select a.ID, b.ID from Table as a
2
by: Throne Software | last post by:
I am working on a ASP .Net page with a C# back end that displays, and give the option to save, an XmlDocument object. While displaying the XML in a literal was easy, I can't figure out how to allow...
0
by: HÃ¥kan Lundgren | last post by:
Hi! I have a Webservice that take a XMLDocument as an argument. I want to validate that XMLDocument to a schema. How do I do that? I don't want to save the XMLDocument to a file and then load it...
3
by: almurph | last post by:
Hi everyone, Hope you can help me. I'm converting an XMlDocuemnt object to a string. I use the following code: Dim doc As New XmlDocument 'Convert XmlDocument object -> String Dim ms As...
2
by: Glenn Venzke | last post by:
I have an XMLDocument object that is attempting to parse an xml document generated by a cold fusion page. The problem is that for some reason the cold fusion page is generating a number of carriage...
0
by: Eduardo Silva | last post by:
Hi, some body know how to transform an xml hierarchy of classes into a xmlDocument object This is the class: <XmlRoot()_ Public Class achievementSubmission <XmlAttribute()>Public...
2
by: joyce chan | last post by:
hi all, How would I get the xml as a string from an XmlDocument object? thanks Joyce
1
by: Daniel | last post by:
what encoding does system.xml.xmldocument.save(string path) use to save the xml document if there is no <?xml... in the front of the xml document?
0
by: dthope69 | last post by:
I have a client that is requiring my web service to accept XMLDocument object as input parameter. I had created it initially to accept byte string and it worked fine. However, when changing to a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.