[Mono-bugs] [Bug 71328][Wis] New - Reduce the size of XML objects

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 15 Jan 2005 17:20:42 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by bmaurer@users.sf.net.

http://bugzilla.ximian.com/show_bug.cgi?id=71328

--- shadow/71328	2005-01-15 17:20:42.000000000 -0500
+++ shadow/71328.tmp.5459	2005-01-15 17:20:42.000000000 -0500
@@ -0,0 +1,85 @@
+Bug#: 71328
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bmaurer@users.sf.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Reduce the size of XML objects
+
+Right now, when we load large xml documents using XmlDocument, we take up
+too much memory.
+
+The problem is that our classes are somewhat bloated:
+
+[benm@omega benm]$ mono foo.exe
+Fields of System.Xml.XmlNode
+     ownerDocument -- System.Xml.XmlDocument (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+     lastLinkedChild -- System.Xml.XmlLinkedNode (Object)
+     childNodes -- System.Xml.XmlNodeListChildren (Object)
+     isReadOnly -- System.Boolean (Boolean)
+Fields of System.Xml.XmlElement
+     attributes -- System.Xml.XmlAttributeCollection (Object)
+     localName -- System.String (String)
+     namespaceURI -- System.String (String)
+     prefix -- System.String (String)
+     isNotEmpty -- System.Boolean (Boolean)
+     nextSibling -- System.Xml.XmlLinkedNode (Object)
+     ownerDocument -- System.Xml.XmlDocument (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+     lastLinkedChild -- System.Xml.XmlLinkedNode (Object)
+     childNodes -- System.Xml.XmlNodeListChildren (Object)
+     isReadOnly -- System.Boolean (Boolean)
+Fields of System.Xml.XmlAttribute
+     localName -- System.String (String)
+     namespaceURI -- System.String (String)
+     prefix -- System.String (String)
+     isDefault -- System.Boolean (Boolean)
+     ownerElement -- System.Xml.XmlElement (Object)
+     ownerDocument -- System.Xml.XmlDocument (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+     lastLinkedChild -- System.Xml.XmlLinkedNode (Object)
+     childNodes -- System.Xml.XmlNodeListChildren (Object)
+     isReadOnly -- System.Boolean (Boolean)
+Fields of System.Xml.XmlText
+     data -- System.String (String)
+     nextSibling -- System.Xml.XmlLinkedNode (Object)
+     ownerDocument -- System.Xml.XmlDocument (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+     lastLinkedChild -- System.Xml.XmlLinkedNode (Object)
+     childNodes -- System.Xml.XmlNodeListChildren (Object)
+     isReadOnly -- System.Boolean (Boolean)
+
+
+On msft, I get:
+
+
+C:\Inetpub\ftproot>foo
+Fields of System.Xml.XmlNode
+     parentNode -- System.Xml.XmlNode (Object)
+Fields of System.Xml.XmlElement
+     name -- System.Xml.XmlName (Object)
+     attributes -- System.Xml.XmlAttributeCollection (Object)
+     lastChild -- System.Xml.XmlLinkedNode (Object)
+     next -- System.Xml.XmlLinkedNode (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+Fields of System.Xml.XmlAttribute
+     name -- System.Xml.XmlName (Object)
+     lastChild -- System.Xml.XmlLinkedNode (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+Fields of System.Xml.XmlText
+     next -- System.Xml.XmlLinkedNode (Object)
+     parentNode -- System.Xml.XmlNode (Object)
+
+Note how msft has *many* fewer fields. This reduces the size of the
+document in memory.