[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Tue, 26 Oct 2004 17:25:19 -0400 (EDT)
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@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=59537
--- shadow/59537 2004-09-16 06:10:20.000000000 -0400
+++ shadow/59537.tmp.18978 2004-10-26 17:25:19.000000000 -0400
@@ -10,13 +10,13 @@
Component: Sys.XML
AssignedTo: mono-bugs@ximian.com
ReportedBy: mordechait@mainsoft.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
URL:
-Cc:
+Cc: bmaurer@users.sf.net,mono@bitfurnace.com
Summary: improve NameTable performance
Description of Problem:
System.Xml.NameTable.cs has two overloaded methods:
Add(char[] ...) and Add(String)
@@ -655,6 +655,36 @@
Also, now that your code seems much faster than old one, it makes
little sense to compare execution speed. It is memory consumption that
is questioned.
You can use "mono --profile yourtest.exe" to get memory allocation
count. On MS.NET, you can use NProf or CLR Profiler.
+
+------- Additional Comments From atsushi@ximian.com 2004-10-26 17:25 -------
+Am back here to improve NameTable performance.
+
+I tried Damien's implementation with practical case, reading document
+instance with XmlTextReader, and it actually resulted in better memory
+consumption. So I think I'll replace existing implementation with this
+new one.
+
+The test code is simple reading:
+
+using System;
+using System.Xml;
+
+public class Test
+{
+ public static void Main (string [] args)
+ {
+ DateTime dt = DateTime.Now;
+// arbitrary number
+for (int i = 0; i < 100; i++) {
+ XmlTextReader xtr = new XmlTextReader (args [0]);
+ while (!xtr.EOF)
+ xtr.Read ();
+}
+ DateTime end = DateTime.Now;
+ Console.WriteLine (end.Ticks - dt.Ticks);
+ }
+}
+