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

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Apr 25 23:51:31 EDT 2006


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 atsushi at ximian.com.

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

--- shadow/71328	2005-01-18 05:23:51.000000000 -0500
+++ shadow/71328.tmp.29292	2006-04-25 23:51:31.000000000 -0400
@@ -91,6 +91,37 @@
 >      name -- System.Xml.XmlName (Object)
 >      lastChild -- System.Xml.XmlLinkedNode (Object)
 >      parentNode -- System.Xml.XmlNode (Object)
 
 XmlAttribute is not XmlLinkedNode.
 
+
+------- Additional Comments From atsushi at ximian.com  2006-04-25 23:51 -------
+I often revisited this bug and I'm still wondering if this bug is
+really worthy for optimizations. Maybe I will close this bug as
+"fixed" (as we really reduced some fields) if no further argument here.
+
+For example, "childNodes" field in XmlNode was introduced when there
+was serious performance problem in Beagle. After adding this cache
+field, Beagle memory consumption was reduced by 1/3 since it
+frequently used ChildNodes which used to create XmlNodeListChildren.
+
+If we reduced this field, it wouldn't result in 3 times better memory
+consumption. I can remove this field and blame System.Xml users for
+not walking the best path, but I doubt it results in good performance
+on the entire mono land.
+
+
+There seems to be another problem. With the following code:
+
+BindingFlags bf = BindingFlags.Public | BindingFlags.NonPublic |
+BindingFlags.Instance;
+foreach (string s in args) {
+        Type t = typeof (XmlNode).Assembly.GetType ("System.Xml." + s);
+        foreach (FieldInfo fi in t.GetFields (bf))
+                Console.WriteLine (fi);
+}
+
+Mono prints fields in the base types, while MS does not. Ben's
+original results are exaggerated, mostly from here. It smells like a
+bug. (It will be reported as a different bug when I found which is the
+source of the problem.)


More information about the mono-bugs mailing list