[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 16 Sep 2004 04:36:54 -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 mono@bitfurnace.com.

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

--- shadow/59537	2004-09-16 03:40:53.000000000 -0400
+++ shadow/59537.tmp.31220	2004-09-16 04:36:54.000000000 -0400
@@ -600,6 +600,39 @@
 improvement is so big though).
 
 ------- Additional Comments From mono@bitfurnace.com  2004-09-16 03:40 -------
 I think we really need to test these NameTables on actual xml. Ill
 post some tomorrow sometime.
 Thanks for the fixes and testing though.
+
+------- Additional Comments From mono@bitfurnace.com  2004-09-16 04:36 -------
+So I tried these NameTables on some test data, and am finding that the
+difference between a fast nametable and a slow nametable only seems to
+make a 1% difference in times. In fact, the difference between the
+best NameTable and no NameTable at all is less than 5%. Maybe Im not
+using the right kind of test data.
+
+static void test2(Type ntype, string xml, int count)
+{
+	int t0 = Environment.TickCount;
+	for (int i = 0; i < count; i++)
+	{
+		XmlNameTable nt = Activator.CreateInstance(ntype) as XmlNameTable;
+		XmlTextReader reader = new XmlTextReader(new StringReader(xml), nt);
+		while (reader.Read()) {};
+	}
+	Console.WriteLine(Environment.TickCount - t0);
+}
+
+Document 1 (27K, 500 reps)
+Mono NameTable 1092ms
+My NameTable 1071ms
+Microsoft NameTable 1092ms
+No NameTable 1101ms
+
+Document 2 (130K, 100 reps)
+Mono NameTable 962ms
+My NameTable  951ms
+Microsoft NameTable 1001ms
+No NameTable 1012ms
+
+Data to follow: